Parameterizing SQL in oracle Enterprise Stage
Posted: Mon Apr 13, 2009 12:14 pm
Hi,
Iam passing user defined SQL through a job parameter and statement looks like this psql (Parameter) string and its default value = SELECT * from EMP where EMP_NO = 'EMPNO~Seq'
and in oracle stage Read Method = user-defined and in SQL Query = #psql#.
When this job runs it is failing by throwing the following error
ORAR_EMP_TABLE: GenericQuery:esqlErrorHandler
Prepare failed for: GenericStmt_1
SELECT * from EMP where EMP_NO = EMPNO~Seq
sqlcode is: -911
esql complaint: ORA-00911: invalid character
When I checked above statement from log . Oracle stage is skipping single quotes around EMPNO~Seq. When I re checked the parameter value it has single quotes but when it is passed to the stage single quotes were discarded. Can some one tell me how to solve this problem.
Thanks,
Somaraju.
Iam passing user defined SQL through a job parameter and statement looks like this psql (Parameter) string and its default value = SELECT * from EMP where EMP_NO = 'EMPNO~Seq'
and in oracle stage Read Method = user-defined and in SQL Query = #psql#.
When this job runs it is failing by throwing the following error
ORAR_EMP_TABLE: GenericQuery:esqlErrorHandler
Prepare failed for: GenericStmt_1
SELECT * from EMP where EMP_NO = EMPNO~Seq
sqlcode is: -911
esql complaint: ORA-00911: invalid character
When I checked above statement from log . Oracle stage is skipping single quotes around EMPNO~Seq. When I re checked the parameter value it has single quotes but when it is passed to the stage single quotes were discarded. Can some one tell me how to solve this problem.
Thanks,
Somaraju.