<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Strange behavior in Developer when loading different number strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218218#M71383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I'd recommend you to create a new thread, given this one was OK more than one year and a half ago...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, where are you using the Text() function and can you share an example of your code here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jan 2013 13:52:10 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2013-01-04T13:52:10Z</dc:date>
    <item>
      <title>Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218212#M71377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems like "number looking" strings are being converted by Qlikview during the execution of load script.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;'001' is converted to '1' if there's another row with value '1' before it.&lt;/P&gt;&lt;P&gt;'1' is converted to '001' if there's another row with value '001' before it.&lt;/P&gt;&lt;P&gt;This is causing some very unexpected result in my actual dashboard. Can someone help me understand why this is happening and how to avoid it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the code:&lt;/P&gt;&lt;P&gt;X:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Id, Code&lt;BR /&gt; X1, '001'&lt;BR /&gt; X2, '200'&lt;BR /&gt; X3, '1'&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Y:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Id, Code&lt;BR /&gt; Y1, '1'&lt;BR /&gt; Y2, '200'&lt;BR /&gt; Y3, '001'&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;Thanks for all the suggestions. To counter this issue where a SELECT statement is used, I ended up using a "Preceding Load" statement to force the columns to be text, using "Text()" function as suggested, before it's saved to Qvds. It seems to be working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Sep 2010 00:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218212#M71377</guid>
      <dc:creator />
      <dc:date>2010-09-25T00:08:23Z</dc:date>
    </item>
    <item>
      <title>Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218213#M71378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;First, you cannot do any conversions or use any functions in inline tables, the values you write are literals (spaces, commas). You will have to load resident and then transform them. Meaning that if the first value QlikView reads from the inline table is understood as number, all values for that field will be so dealt. Likewise, if your first line was&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;X1, A&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;All following values for Code will be "strings" for QlikView. Then you may discard this dummy value.&lt;/P&gt;&lt;P&gt;As a note, INLINE tables are good for some purposes, but their behavior in regards to nulls, empty and numeric values is not the same as it is for the other way of loading data into QlikView.&lt;/P&gt;&lt;P&gt;What it seems to me it's happening is that you need to convert your Code field to text, so preceding zeroes are respected. QlikView doesn't have data types as they are usually set when you create a table in SQL, although you can transform them using several functions.&lt;/P&gt;&lt;P&gt;Following your example, your code should look like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;X:LOAD Id, Text(Code) AS CodeFROM FILE.QVD (qvd);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now your Code field will have those leading zeroes. The example is loading from a QVD file, you can set your own SQL SELECT statement.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Sep 2010 00:23:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218213#M71378</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-09-25T00:23:06Z</dc:date>
    </item>
    <item>
      <title>Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218214#M71379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only as a comment but not a solution:&lt;/P&gt;&lt;P&gt;I had the same problem some time ago (and still have no solution) and learned, that QV defines the datatyp automatically by the first record comming from the data source. If it finds a text (as in your inline statement) it uses text, if it finds something that is interpretable as number it cuts leading zeros and takes number. If you load from an oracle table (without formatting function) for example a 001 would always be cut to 1, but if first value is "abc" and second 001 the leading zeros wold survive. I had the problem that I load many tables from Oracle with a loop and sql select * from statement and got missmatches in ID field values between different tables depending of the first record you load with the sql.&lt;/P&gt;&lt;P&gt;forced fomatting with text() or num() works as long as you can specify the fieldname and do not use "*" for load.&lt;/P&gt;&lt;P&gt;I never found a way to tell QV to produce a forced text load...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Sep 2010 06:56:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218214#M71379</guid>
      <dc:creator />
      <dc:date>2010-09-25T06:56:32Z</dc:date>
    </item>
    <item>
      <title>Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218215#M71380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is quite normal for Qlikview - as it only stores one occurence of a value internally it regards 1 and 001 as the same (numeric) value.&lt;/P&gt;&lt;P&gt;Just force it to load as text using:&lt;/P&gt;&lt;P&gt;text(fieldname) as fieldname&lt;/P&gt;&lt;P&gt;then 1 and 001 will be stored as '1' and '001' respectively.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 10:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218215#M71380</guid>
      <dc:creator />
      <dc:date>2010-09-26T10:32:11Z</dc:date>
    </item>
    <item>
      <title>Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218216#M71381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But what to do if you need to load with "*" Because you load for example several tables with unknown field names? I have this case when I download a set of oracle tables to be stored in QVD_files. Then you can not use text() function.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 13:18:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218216#M71381</guid>
      <dc:creator />
      <dc:date>2010-09-26T13:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218217#M71382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have even a more complex and strange problem so solve:&lt;/P&gt;&lt;P&gt;we have two different items with their number 100-001-123 and 100-1-123.&lt;/P&gt;&lt;P&gt;In QV they are all treated as 100-001-123, although I read them from an MSSQL table using the text() function.&lt;/P&gt;&lt;P&gt;Removing the text(function) will not work, since then the items like 0000100 and 100 will be treated as the same.&lt;/P&gt;&lt;P&gt;Anyone an idea how to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 11:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218217#M71382</guid>
      <dc:creator />
      <dc:date>2013-01-04T11:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Strange behavior in Developer when loading different number strings</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218218#M71383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I'd recommend you to create a new thread, given this one was OK more than one year and a half ago...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, where are you using the Text() function and can you share an example of your code here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 13:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-behavior-in-Developer-when-loading-different-number/m-p/218218#M71383</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2013-01-04T13:52:10Z</dc:date>
    </item>
  </channel>
</rss>

