Discussion Board for collaboration on QlikView Scripting.
I have a problem with some fields, having leading zeros.
For example a field like OrderNo..
In source 1 the OrderNo. looks like: 00001234567, 00012345678
In source 2 the OrderNo. looks like: 1234567, 12345678
Qlikview don't seem to have a problem with that, but is there a solution to cut off the leading zeroes or to define a lenght e.g. of 14 and fill with zeros?
Or is it unnecessary to care about this?
Thanks for any advice.
- PS -
Go to Solution.
try using num(fieldname)
if you want to make the orderno in same format then try Repeat function:
Below is the sample scirpt:
load * Inline
Repeat(0,14-len(value))&value as testvalue
and other way is using NUM(value): it will remove the zero's.
hope it helps
pick(wildmatch(OrderNo,'1*'),'1*') as OrderNo_new
thank you for your reply!
I didn't had time to check the solutions, yet. But when I interpret your solution right, than this does not work with 00007654321? "12345678" was just an example the "orderno" can begin with any number...
Anyway, num(fieldname) did the trick.
Thank you very much for the fast replies.