Hey Guys,
Can any one let me know why this query is not working when passed as a parameter?
select cast (count(1) as number(15)) as count,cast (sum(TRANSACTIONAMT) as number(21,2)) as amount, \' 1 \' as flag from TST
Error from director:
PS_NW_GLTXNF_SF: GenericQuery:esqlErrorHandler
Prepare failed for: GenericStmt_1
query is: select cast (count(1) as number(15)) as count,cast (sum(TRANSACTION_AMT) as number(21,2)) as amount, \ 1 \ as flag from TST
sqlcode is: -911
esql complaint: ORA-00911: invalid character
Passing SQL as Parameter
Moderators: chulett, rschirm, roy
Because (I assume) the slashes are invalid characters after the quotes are stripped, which DataStage is wont to do. Perhaps?
Note those are two single quotes, not double quotes.
Code: Select all
select cast (count(1) as number(15)) as count,cast (sum(TRANSACTIONAMT) as number(21,2)) as amount, '' 1 '' as flag from TST
Note those are two single quotes, not double quotes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers