hi all
All i need to do is i have a column that is 5 characters long .
I need to LPAD it with 0's if its not 5 characters long
Input col = ABCD OUTPUT = 0ABCD
Input col = ijklm OUTPUT = ijklm
basically the oracle LPAD equivalent .
I found the
PadString function
Return the string padded with the optional pad character and optional length
string (string)
padlength (int32)
result (string)
but i cannot find it in the trasnfomer when i do the right click so i dont knwo what the input parameters are
thanks
rxs0005
LPAD equivalent in DS
Moderators: chulett, rschirm, roy
The function/derivation you are looking for is FMT(In.Column,'5"0"R')
<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:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why didn't you ask in the parallel forum?
Assuming you have a string data type you would use something like
If the incoming data type is not string, you would need to convert it to string.
Assuming you have a string data type you would use something like
Code: Select all
Left("00000",5-Len(InLink.TheString)) : InLink.TheString
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.