UserDefined SQL

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Xpert
Premium Member
Premium Member
Posts: 85
Joined: Wed Mar 01, 2006 7:17 am

UserDefined SQL

Post by Xpert »

Hi,

I need to insert oracle sequence values in Oracle OCI stage(Target), what should i have to do? Pls help me. Layout is shown below..


Source ---------> Transformer-----------> Oracle OCI.


I tried with user defined sql. Pls help me.... Thnx in Advance....
With regards,
Xpert
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello Xpert,

what user-defined SQL did you try and what was the error? Oracle sequences work quite well in DataStage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do NOT provide a key value from the DataStage job Columns collection.

Your SQL should then have the form:

Code: Select all

INSERT INTO tablename(key_col, col2, col3, ...) VALUES (sequencename.NEXTVAL, :1, :2, ...)
Make sure there are as many non key column references in the column names clause and parameter markers in the values list as there are column definitions in the job's Columns collection, and that all data types are compatible.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Xpert
Premium Member
Premium Member
Posts: 85
Joined: Wed Mar 01, 2006 7:17 am

Post by Xpert »

Hi,


I got the answer, thnx for ur replies....
With regards,
Xpert
Post Reply