Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
lalitkgehlot89
Creator II
Creator II

How to remove 0 from script.

Hi,

I want to remove the first five 0 from the data.

TAB1:

LOAD * INLINE

[

CUSTOMER

0000012234,

00000REPLW,

1236050

];

Plz help me out.

Thanks.

3 Replies
tamilarasu
Champion
Champion

Hi,

Try like below,


TAB1:

LOAD *, If(Left(CUSTOMER,5)='00000',Mid(CUSTOMER,6),CUSTOMER) as New;

LOAD * INLINE

[

CUSTOMER

0000012234,

00000REPLW,

1236050

];

avinashelite

if you have 5 zeros always then ...try like this

TAB1:

LOAD * INLINE

[

CUSTOMER

0000012234,

00000REPLW,

1236050

];

result:

LOAD if(left(CUSTOMER,5)='00000',replace(left(CUSTOMER,5),'',CUSTOMER) as New_CUSTOMER,

CUSTOMER

resident

TAB1;

Drop table TAB1;

pascal_theurot
Partner - Creator II
Partner - Creator II