Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Colleagues, good day!
Some questions about string fuction Index...
I have simple table, which contain num and text values with leader zeros.
Test |
006545 |
005 |
35 |
45 |
43 |
00fdfsdfsd |
00yuturt |
0665 |
0fdhfg00 |
I need to suppress them. My idea to use left function and index of last left zero.
How i can find this index in expr?
thanks.
May be this:
=Mid(Test, FindOneOf(Test, 'abcdefghijklmnopqrstuvwxyz123456789'))
May be this:
=Mid(Test, FindOneOf(Test, 'abcdefghijklmnopqrstuvwxyz123456789'))
is this you need?
a:
LOAD * Inline
[
Test
006545
005
35
45
43
00fdfsdfsd
00yuturt
0665
0fdhfg00
];
LOAD *
,
PurgeChar(Test,'0') as newvalu
Resident a;
or this:
=Mid(Test, FindOneOf(Lower(Test), 'abcdefghijklmnopqrstuvwxyz123456789'))
This will remove any 0... I don't think this is what the OP wants
Thanks)
Could you explain me please, how works this two functions?
Thanks, but i need to remove only left zeros.
yes)
FindOneOf will look for the first occurrence of the values supplied
FindOneOf(Test, 'abcdefghijklmnopqrstuvwxyz123456789')
Notice how I did not give 0 in the list. Once you know the location of the 1st non-zero number, you just use a Mid function where you tell where to start.