Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Employee
Employee

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.