concatenate zeros to fields

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

concatenate zeros to fields

Post by hargun »

hi i have input fields like
49456.07

The output i need is
00049456

i tried by using
left('00000000': left(select_stats.TRN_VOLUME_COUNT2,6),8).

Giving me results
00000000

i need 00049456



The length of column is varchar(8))


Can you please help me on this
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is your source field a string or a decimal? Your outer function should be a Right() not a Left(), btw.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Right(Str("0",8):Field(InLink.TheString,".",1,1),8)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply