If I have to return a dataframe from rqScript which contains string, then how am i suppose to mention it in the return type of rqTableEval.
For example if the return value from rqScript is
that is one number and other string
Then in the rqTableEval, to identify the return values
'select 1 ID, "1" String from dual'
1 works as an identifier for numbers but "1" does not work, returning "1" as Invalid Identifier for string
I tried with host of permutations "\*" , ".\*" , ''a'' etc none seem to work
May i please get help on what needs to be specified as identifier for string type ?
Edited by: Kedar Gupte on May 21, 2013 1:52 AM
The string should be long enough to accommodate the output. For example, for a maximum length of 10 characters you can do <tt>'aaaaaaaaaa'</tt> or <tt>cast('a' as varchar2(10))</tt>. Also you need to use single quotes instead of double quotes. In SQL double quotes are used for specifying identifiers (like column names, table names, etc.). In your example <tt>"1"</tt> is an unknown identifier. What you need is a string literal.
Thanks Denis, it worked.
Just one more point that was found, single quote (') needs to be prefixed with another single quote or else the sql statement would result in syntax error.
cast(''a'' as varchar2(10)) would be more appropriate.