Page 1 of 1

Removing all preceding zeros [0]

Posted: Tue Jun 02, 2009 9:50 am
by Sourav
hi,

I have a source records which are not fixed length.I am giving some examples as mentioned below :

1. 0012345
2. 072945
3. 001239567
4. 1234576
5. 0007992345

But i need only those records except 0 [ removing all 0 from the preciding position ] means output will be like as follows .
1. 12345
2. 72945
3. 1239567
4. 1234576
5. 7992345

Kindly help me ..

Posted: Tue Jun 02, 2009 10:05 am
by nagarjuna
Read it as an integer

Posted: Tue Jun 02, 2009 10:45 am
by samsuf2002
Search the forum.

Posted: Wed Jun 03, 2009 2:44 am
by ArndW
The TRIM function, while usually called with only one parameter, has several options that are quite handy. In this case, you could do a

Code: Select all

Trim(In.NumberColumn,'0','L')
This means trim all leading 0's from the column "In.NumberColumn".