Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
mato32188
Specialist
Specialist

Item numbers recognition...

Hi,

     we have records of items starting with 000XXX (varchar).

Problem:

Frontend users see two different items, first one as 000111, second one as 0111. Those are two different Items with other characteristics in other tables. Qlikview shows such item numbers as 000111 for both of them.

Is it considered as "number 111"? Why are there automatically added zeros? We tried perform pure SQL select in MS Sql man. studio, wasnt any problem to recognize 0111 and 000111.

Could anybody knows to solve this issue?

Thanks a lot

M

ECG line chart is the most important visualization in your life.
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try using text() while loading the data.

View solution in original post

4 Replies
tresesco
MVP
MVP

Try using text() while loading the data.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Yes, it is considered a number. Qlikview infers the data type (numerical in this case) and the display format ("000000" in this case) from the first instance of that field.

To keep them separate, force QV to load that field as text, like:

     LOAD text(ItemId) As ItemId,

          ...

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MK_QSL
MVP
MVP

You can use below in QlikView Load Script

Load

     Field1,

     Field2,

     TEXT(YourIDField) as YourIDField;  

SQL Select * From .....;

cfz
Former Employee
Former Employee

Hi Martin.

From the Frequently Asked Questions in the Reference Manual:

Q: Why are for instance '002', '02' and '2' sometimes interpreted as the same value by QlikView?

A: All the values in the example share the same numeric value in QlikView. As a rule, QlikView will try a

numeric interpretation of any data. If a numeric interpretation is possible, it will be used for the association.

If you use the interpretation function text() on a field in the script, however, the values will be treated

strictly as text values. The values in the example above will then be interpreted as three different values.

I hope it helps

Carlos