i want to populate the 16 digit incremental number for one column.
column datatype is varchar
how to generate the 16 digit number in the datastage
anyone please help me.
Thanks in advance
how to generate the 16 digit number in the datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
To expand, generate regular integers, then transform them to strings with a function such as
For improved performance, initialize a stage variable, say sv16zeroes, to Str("0", 16), and use the stage variable rather than the function call in the derivation expression. That way the Str() function is only evaluated once. You could use "0000000000000000" instead.
Code: Select all
Right(Str("0",16):InLink.MyInteger, 16)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
thanks for your replyray.wurlod wrote:To expand, generate regular integers, then transform them to strings with a function such asFor improved performa ...Code: Select all
Right(Str("0",16):InLink.MyInteger, 16)
let me check.