Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

zeros ?

Hi All,

I have one Column ContractID..

Values:

000238

000567

000786

001234

001435

028978

I want to remove zeros how can i write in back end scripting..

1 Solution

Accepted Solutions
Not applicable
Author

replace(ltrim(replace(ContractID,'0',' ')),' ','0') as ContractID

This was taken from a previous discussion:

Remove Leading Zeros from Field while loading

View solution in original post

7 Replies
tresesco
MVP
MVP

Num(ContractID) as ContractID

Not applicable
Author

replace(ltrim(replace(ContractID,'0',' ')),' ','0') as ContractID

This was taken from a previous discussion:

Remove Leading Zeros from Field while loading

dmohanty
Partner - Specialist
Partner - Specialist

Hi,

Use like this below :

 

PurgeChar(ContractID , '0') as NewContractID

OR

 

num(ContractID ) as NewContractID

ashfaq_haseeb
Champion III
Champion III

Hi,

May be like this.

Regards

ASHFAQ

fkeuroglian
Partner - Master
Partner - Master

Hi, try this:

REPLACE(LTRIM(REPLACE(FIELD, '0', ' ')), ' ', '0')as FIELD,

good luck

Fernando

Not applicable
Author

you can use:

num(youFieldName)

it will cut of leading zeros.

regards,

MT

fernando_tonial
Partner - Specialist
Partner - Specialist

You try this:

Data:

LOAD Values, Num(Values,'0') AS Values_New INLINE [

    Values

    000238

    000567

    000786

    001234

    001435

    028978

];

Best Regards.

Tonial.

Don't Worry, be Qlik.