on 09-08-2014 6:04 PM
Hi there.
I am having issues with something that appears to be really simple.
I just want to add a calculated column in a projection and print a string in this row.
Like the example below:
var_sales = CE_PROJECTION(:var_in,
[
"COMPANY",
CE_CALC('SOME TEXT', varchar(100)) AS "TYPE"
]
);
The odd thing is that if I put a INTEGER on 'SOME TEXT' it will work, but I need a string to be output.
In the graphical mode is really simple to do it, I just need to print the string in single quotes. But I have to do it in sqlscript because I am calling a procedure before it.
Quotes in SQLScript get tricky. The ' denotes the expression so you need to add another '' (triple quotes) to specify a string inside the expression. The following will compile.
var_sales = CE_PROJECTION(:var_in,
[
"COMPANY",
CE_CALC('''SOME TEXT''', varchar(100)) AS "TYPE"
]
);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.