Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kirti007
Contributor
Contributor

Qlikview-SAP SQL Select Load statement issue

Hi,

 

I am using following query: It gives me weird result.  SQL load is not considering 'E' at the end of the customer string.

please help me find solution. I know this is happening because 0000037004 is getting loaded first and while loading 37004E, Qlikview considers it as same integer as previouly loaded.

 

When I load all records from customer table, I see 2 records as per below image.

ABC:
SQL Select
*
from CUSTOMER
Where CUSTOMER = '0000037004' or
CUSTOMER = '37004E'
;

Result:

clipboard_image_0.png

 

Labels (2)
1 Reply
Brett_Bleess
Former Employee
Former Employee

Kirti, I believe the correct solution on this one is to add Load statement in front of your SQL Select and use the Text() function on that field, that will ensure the leading zeros are maintained I believe.  

So something like...

ABC:

Load Text(CUSTOMER) AS CUSTOMERTEXT...

SQL Select *...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.