Page 1 of 1

Calling Sequence from DataStage

Posted: Wed May 03, 2006 10:12 am
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.

Posted: Wed May 03, 2006 11:25 am
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".

Posted: Wed May 03, 2006 11:39 am
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.

Posted: Wed May 03, 2006 11:41 am
by chulett
If you don't need to know it, you could use it directly in a custom insert sql statement.