Passing sql as parameter
Posted: Wed May 14, 2008 1:34 pm
Hi,
Im passing an Sql query as a parameter to the job
e.g select name where state in ('NY','NJ')
The query works fine in Oracle but when I pass it as a parameter to the job, it fails. On going through the log I saw that the query was not getting coverted properly.
The log was as follows :
Oracle_Enterprise_0: The provided query statement did not prepare correctly;
please verify that your statement is correct;
statement: SELECT name where state in (NY,NJ).
The quotes were removed from the in clause,hence the failure.
Can anyone point me to what should be done so that Datastage interprets the quotes.
The job runs fine if I pass a query with numeric data e.g: select name where empid=189
Regards
Wah
Im passing an Sql query as a parameter to the job
e.g select name where state in ('NY','NJ')
The query works fine in Oracle but when I pass it as a parameter to the job, it fails. On going through the log I saw that the query was not getting coverted properly.
The log was as follows :
Oracle_Enterprise_0: The provided query statement did not prepare correctly;
please verify that your statement is correct;
statement: SELECT name where state in (NY,NJ).
The quotes were removed from the in clause,hence the failure.
Can anyone point me to what should be done so that Datastage interprets the quotes.
The job runs fine if I pass a query with numeric data e.g: select name where empid=189
Regards
Wah