Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

Qlik Sense is cutting off leading 0

I have zipcodes like 04106 (US) and v3w (Canada). When I code:

sql

select zipcode

from table;

It's cutting off leading 0. For example, 04106 becomes 4106. How can I fix this problem?

I have tried num(zipcode), but it's going to remove zipcodes like v3w.


Thanks in advance!

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

try this:

table:

load

text(zipcode) as zipcode;

sql

select zipcode

from table;

View solution in original post

2 Replies
YoussefBelloum
Champion
Champion

Hi,

try this:

table:

load

text(zipcode) as zipcode;

sql

select zipcode

from table;

CarlosAMonroy
Creator III
Creator III

Hi Wanyun,

I guess you can handle the field as text, instead of num. That way you will have both values with no alterations.

Carlos M