Page 1 of 1

Passing an insert query as a parameter to Oracle Enterprise

Posted: Tue Mar 16, 2010 1:02 am
by swerajan
Hi.
I have a job that is used to load data into oracle table using the oracle enterprise stage as it supports RCP. I am using an insert query with decode statement in it. The job is running fine if i use the insert query directly in the Oracle enterprise stage. But I need to pass this query as a parameter. When i pass the insert query as a parameter
"insert into table (col1,col2) values (orchestrate.col1,decode(trim(orchestrate.col2),NULL,\'NULL\','',\'Blank\',orchestrate.col2))"
It throws a message of "Identifier too long.

When i used it like this:
"insert into table (col1,col2) values (orchestrate.col1,decode(trim(orchestrate.col2),NULL,'NULL','','Blank',orchestrate.col2))"
It throws a message of "Update statement did not prepare properly"
How can i achieve this. Please suggest.

Posted: Tue Mar 16, 2010 3:39 am
by Sainath.Srinivasan
The error appears to say that your Update query is not correct.

Did you use Upsert mode ?

Provide a dummy update SQL to overcome.