Hi,
My source data is 123 and datatype is varchar2 and length is 10
I want to store it as 0000000123 in the target data with datatype varchar2 and length 10.
How to pad leading zero to string
Moderators: chulett, rschirm, roy
How to pad leading zero to string
Nirdesh Kumar
-
- Premium Member
- Posts: 37
- Joined: Mon Dec 08, 2008 4:02 am
- Location: Milton Keynes, UK
In a Transformer derivation expression, you could try:
That is, you prepend 10 zeroes to the start of your data, then substring the right-most 10 characters.
Syntax is the same in both Server and Parallel jobs.
Code: Select all
("0000000000":link.col)[10]
Syntax is the same in both Server and Parallel jobs.
Basically the same technique with a different function:
Code: Select all
Right("0000000000" : link.col, 10)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers