Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Commuity,
To remove Leading zeros in following field we can use Num(Field) but it creates null for value of CGDF, GHJJJJ etc
Can we have any workaround solution at script level to keep the CGDF,GHJJJJ etc as it is and only remove those leading zeros
Field |
---|
0000154 |
005 |
CGFD |
GHJJJJ |
01 |
Output should be
154 |
5 |
CGFD |
GHJJJJ |
1 |
May be using Keepchar / Purgechar
PurgeChar(Field, '0')
May be like this
Trim(replace(Feild,'0',' '))
or
replace(Feild,'0','')
if Field has a value like 000150 it will create 15.
i think it is not a perfect one here. in this case we want 150 (only removing leading zeros)
Can you send real data. We can work for you if you provide 10-15 Records
In such case
replace(ltrim(Replace('000150','0',' ')),' ',0)
replace(ltrim(Replace(Field,'0',' ')),' ',0)
Data:
Load
Field as OriginalField,
Right(Field,Len(Field)-FindOneOf(Upper(Field),'ABCDEFGHIJKLMNOPQRSTUVWXYA123456789')+1) as NEW
Inline
[
Field
0000154
005
CGFD
GHJJJJ
01
];
Anilbabu,
Values are just like original data. You can work on that
Try this
LET Var1 = 1;
Right(Field,Len(Field)-FindOneOf(Upper(Field),'ABCDEFGHIJKLMNOPQRSTUVWXYA123456789')+'$(Var1)')
Update: Manish gave same check that and let us know
Try this
Replace(Field,0,'') as FieldN