Hi
in one of my requirement i need to generate sequence number in the target file like
SeqNum| CustName|
0001 | aaaaa
0002 | bbbbbbb
0003 | fdaggghhh
this is my requrement but i am not able get it through surrogate key generator it is giving like 1 2 3 4 like this.
Pls any one can help me
Thanks in Advance
prams
surrogate ky generator problem
Moderators: chulett, rschirm, roy
Are you saying that you are getting "1" but wish to output "0001"? The generator is creating a number which never has leading spaces. There are many ways to create a string like this, one way would be to use the derivation "RIGHT('0000':DecimalToString(In.SequenceColumn),4)"
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Note: the generator is creating a number.
You can not apply the transformation within the generator operator. You must add the leading zeroes in a downstream Transformer stage.
You can not apply the transformation within the generator operator. You must add the leading zeroes in a downstream Transformer stage.
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.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
ray.wurlod wrote:Note: the generator is creating a number.
You can not apply the transformation within the generator operator. You must add the leading zeroes in a downstream Transformer stage. ...
You can change the datatype in surrogate key generator from unsigned bigint to Number of length greater than length of bigint
Not satisfied with the answer?
then post discriptive query.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.