Passing an insert query as a parameter to Oracle Enterprise

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
swerajan
Participant
Posts: 42
Joined: Tue Aug 05, 2008 4:34 am

Passing an insert query as a parameter to Oracle Enterprise

Post 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.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
Post Reply