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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dagkjensbekk
Contributor
Contributor

Qlik does not load the distinct values

Hi,

I am trying to make a model from a parts database and I have discovered that Qlik has merged some of my part codes.

Input from database. Field is String
PAR_CODE   PAR_DESC
00966             OMRON KAP/IND. GIVERE
0966                INTERPUMP GROUP GENERAL PUMP KIT.N 170
01025              Avf.pose LD 12my hvit 60x60cm 35L
1025                 SUPER LONG LIFE 58W

 

Output in Qlik
PAR_CODE   PAR_DESC
00966             OMRON KAP/IND. GIVERE
                          INTERPUMP GROUP GENERAL PUMP KIT.N 170
01025              Avf.pose LD 12my hvit 60x60cm 35L
                          SUPER LONG LIFE 58W

 

My load script is:

PARTS:
SQL SELECT "PAR_CODE",
"PAR_DESC"
FROM xxxxxxx.dbo.R5PARTS;

How can I solve this?

Best regards,

Dag

1 Solution

Accepted Solutions
Vegar
MVP
MVP

QlikView is interpreting PAR_CODE as a numeric value, 00966 and 0966 is the same numeric value. You need to explicit make QlikView evaluate the field as a text string in order to distinguish between the two.

Try is the script below works for you.

PARTS:
LOAD
Text(PAR_CODE) as PAR_CODE,
PAR_DESC;
SQL SELECT "PAR_CODE",
"PAR_DESC"
FROM xxxxxxx.dbo.R5PARTS;

View solution in original post

2 Replies
Vegar
MVP
MVP

QlikView is interpreting PAR_CODE as a numeric value, 00966 and 0966 is the same numeric value. You need to explicit make QlikView evaluate the field as a text string in order to distinguish between the two.

Try is the script below works for you.

PARTS:
LOAD
Text(PAR_CODE) as PAR_CODE,
PAR_DESC;
SQL SELECT "PAR_CODE",
"PAR_DESC"
FROM xxxxxxx.dbo.R5PARTS;
dagkjensbekk
Contributor
Contributor
Author

Thanks Vegar, this solved it!