In Derived COlumn Transformation i have fields DCDAY and DCMON that i would like to append "0" infront if length is 1.
Can anyone tell how could i do that?
Remember your output has to be a str value as you want the 0 to precede a single digit 01 as an int will be 1. So in order to accomplish this you first nees to cast your DCDAY to a str. No need to mes with a LEN to test for the current length in you RIGHT(x,2) you will always get the 2 most right characters so 02 would result in 0 even though an incomming dcday 12 would be 012 the right would reduce it to 12.
Code:
RIGHT("0"+ TRIM((DT_STR, 2,1252) [DCDAY]),2)
Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.