How can I trim 3 leading zeroes of a decimal number

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
pebbles
Participant
Posts: 15
Joined: Wed Oct 24, 2007 7:54 am

How can I trim 3 leading zeroes of a decimal number

Post by pebbles »

I am trying to trim 3 leading zeroes from from a Varchar and decimal and can't seem to get it working. :oops:
Ernest A
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Can you give a example?
Do you have three leading zeros infront of Decimal converted to string?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
pebbles
Participant
Posts: 15
Joined: Wed Oct 24, 2007 7:54 am

Post by pebbles »

[quote="kumar_s"]Can you give a example?
Do you have three leading zeros infront of Decimal converted to string? ...[/qu

Below is a sample:

000320502227900616
Ernest A
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You Trim(Input.field,'0','L') in transformer as string.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

Will there always be 3 leading zeros? Also I don't see a decimal there? What formats are you going from and to (give lengths, precisions, scale)
Post Reply