Calling Sequence from DataStage

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
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Calling Sequence from DataStage

Post by iwin »

Hi,
I am trying to call Sequence from Database to generate a key in the datastage. Please advice me how to call a sequence in datastage. I am not refering to JOBSequence.

Thanks in advance.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I assume you are talking about a Oracle seqeunce number. There are lots of posts where the insert statement was modified to create the surrogate key using a sequence number. Do a search. I would try exact search on ".nextval".
Mamu Kim
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Follow Kim's advice, but the general idea is that you will use a reference lookup to the OCI stage and custom SQL that does the select of the next value from the sequence.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you don't need to know it, you could use it directly in a custom insert sql statement.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply