7 Replies Latest reply: Sep 20, 2017 4:46 PM by Stefan Wühl RSS

    csv file load issue: Numeric strings get stored as numbers

    Lucia Colombo

      Hi, am using Qlik Sense Desktop 3.2, and I hit an issue loading data from a csv file where a column contains mixed content - can be text or numbers - which should always be treated as text. I did specify in the load statament "load (text(field1)) as field1 from [...]", but if the content of field1 may be interpreted as a number, then it actually gets stored as such, although it apparently will show as text.

      This will prevent from having different text values for strings which would represent the same numeric value.

      For example, field1 may contain "00022" in a row, and "0022" in another one. Loading these values as text, I would expect the number of leading zeroes to be preserved correctly for each row. Instead, I get all "00022" or all "0022", depending possibly on the order of occurrencies.

      For the time being, the only workaround I found out has been to concatenate an alphabetic char to field1 within the load statement, and then deal with the added char in the app in some way.

       

      Would there be any other way to avoid such strings from being stored as numbers?

       

      Thanks,

      Lucia