Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have data like
x
01234
01234
09872
CK78
GH78
I want to load x with no leading zeros like 1234 and text as same. Both should be of number and integer type.
try like this
Load
if (Num(x) > 0, Num(x),x) as x
from ....;
you can try following code
replace(ltrim(Replace(X,'0',' ')),' ','0') as X_New
hope this will help you.
Hi,
Try this script
LOAD
If(IsNum(x),Num(x), x) AS zx
INLINE [
x
01234
01234
09872
CK78
GH78];
Regards,
Jagan.
Hi,
Try below
LOAD *,
replace(ltrim(replace(x, '0', ' ')), ' ', 0) as New_Number;
load * Inline
[
x
01234
01234
09872
CK78
GH78
];
Regards
ASHFAQ
Hi,
one solution:
Alt(Num(x), x)
table1:
LOAD x,
Alt(Num(x), x) as Alt_x
Inline [
x
01234
01234
09872
CK78
GH78
];
hope this helps
regards
Marco