Sequence in DS

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
karthikgk0705
Premium Member
Premium Member
Posts: 45
Joined: Tue Aug 29, 2006 2:59 am
Location: Bangalore

Sequence in DS

Post by karthikgk0705 »

Hi All,

Pls clarify me regarding how to call an oracle sequence inside the data stage?
bibhudc
Charter Member
Charter Member
Posts: 20
Joined: Thu Jun 19, 2003 12:26 pm

Re: Sequence in DS

Post by bibhudc »

karthikgk0705 wrote:Hi All,

Pls clarify me regarding how to call an oracle sequence inside the data stage?
one way would be to use userdefined sql while you either do the select or insert in the Oracle stage .. i.e. use schema_name.SEQuence_name.nextval

an alternate way would be to do the same via a OCI lookup stage.

take a look at viewtopic.php?t=99049
Bibhu
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

You can write a routine to call this oracle sequence, and call the routine in your job
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Just stick it in user-defined SQL.

Code: Select all

INSERT INTO table(keycol,colA,colB) VALUES (seqname.NEXTVAL,:1,:2);
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply