Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am getting from the source a field wich is filled up with zero's infront of the actual value, i would like to remove all the leading zero's is there a way to do that?
Example: 00004 should become 4
0004A should become 4A
00040 should become 40
Thanks for any help!
Hi,
Check this below link.
http://community.qlik.com/forums/p/17456/68339.aspx#68339
This should help you.
- Sridhar
Hi,
Check this below link.
http://community.qlik.com/forums/p/17456/68339.aspx#68339
This should help you.
- Sridhar
Great that helped a lot , the only issue remaining with this is that in case there was a space in the original field this is now filled with a zero.
i.e. 00018 BIJ is now displayed as 180BIJ.
Many thanks!
Linda
Linda,
your codes are, indeed, very creative. Usually you wouldn't expect a space in the middle of a code. Well, that only means that you need one more replace round. Found a character that is definitely not part of your codes (I'll use ~ for example) and first covert spaces to ~, then get rid of zeros, and then convert ~ back into spaces. Something like this:
replace(replace(ltrim(replace( replace( ltrim(OldCode), ' ', '~'), '0', ' ')), ' ', 0), '~', ' ')
Oleg
beautiful