Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Leading 0 in Text field Qlikview transforms data incorrectly

I am having an issue where Qlikview is acting oddly. I have a part number field from the data base that is a text field. Occasionally a number is entered here. Qlikview is then doing the following:

Part in Database:

08491710

8491710

These are two separate Part numbers.

Qlikview displays:

Part in Qlikview:

08491710

This is causing issues now. I have discovered that this happens soely in Qliview because loading the field like: text(partnum) as partnum will display the correct values. However, the first time I load this table, I store the entire table into a QVD using just:

Select *,

From ......;

Store ... into ...;

This is then converting it with qlikview so that I can no longer apply the text command to this field. I tried loading from the QVD using text(partnum) as partnum and it does not show correctly. Is this another situation where I will have to put the entire Select statement into a Load statement and apply text() to every field that should be a string?

This seems a bit ridiculous as this makes it so I can no longer user the * command, and now have to manually figure out what fields are text.

Note: I tested verbatim and it has no effect on this issue.

15 Replies
Not applicable
Author

Does not work for me - version 10.

Not applicable
Author

You need to add the text function in a proceeding load statement:

Load

Text(field) as field;

SQL Select

Field

From …;

Not applicable
Author

Marc - please note that we are selecting data from DB2 with SQL, storing the selected rows in a QVD and loading the rows from the QVD into Qlikview - where exactly do i need to locate the Text() function?

Not applicable
Author

This would need to be done before you store the data into the QVD. As soon as Qlikview loads the data it converts it.

So you would need:


Table:

Load

Text(field) as field;

SQL Select

Field

From …;

STORE Table into [\\........qvd(qvd)];

even if you convert the field to text in the select statement Qlikview would still read it as a number if it contains all numbers. This needs to be done this way for QVD's because once it is saved the leading 0 would be lost.

Not applicable
Author

Great - worked for me - many thanks.

Not applicable
Author

Hi i'am with the same problem, used text() but doesnt seems to work, it's mandatory to drop and rename?

My thread with the same problem Qlikview leading zeros