Sequence generator

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
venkates.dw
Participant
Posts: 67
Joined: Mon Dec 22, 2008 4:07 am

Sequence generator

Post by venkates.dw »

Hi,

in server jobs sequence generation purpose we use @inrownum. suppose when i am executing first time it will generate sequence numbers. Suppose i am executing once again for appending the records again it will generate from 1 2 3 ...... . but i need continution from alreay existing numbers.

Give me the solution please...

thanks.....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't use @INROWNUM as the actual sequence number but rather the offset from a starting point. That starting point is passed in as a job parameter and is the maximum value currently in use in your target that you look up before the job starts. Then simply add @INROWNUM to that job parameter.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Or Use the supplied KeyMgmt Routines.
Post Reply