<?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 QlikView mergin data in Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967312#M951456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am loading from a dbf file and I noticed an issue I cannot find a way to solve and perhaps someone can help me: I have a customer account number 19115, I also have another customer 00019115. When I load the data on my script, if I use Distinct then both records show as 00019115, I know both are showing because they both have different Tax rate. If I don't use Distinct then both records appear as 19115. This is causing a problem with my key because QlikView is merging both records and either eliminating the '0' or adding the '0'. I tried adding the record number to see if this will make a difference and I got the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Distinct&lt;BR /&gt; RecNo(), account , store, tax1, tax2 FROM Customer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can somebody help me solve this please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hugo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Dec 2015 21:51:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-12-07T21:51:04Z</dc:date>
    <item>
      <title>QlikView mergin data in Error</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967312#M951456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am loading from a dbf file and I noticed an issue I cannot find a way to solve and perhaps someone can help me: I have a customer account number 19115, I also have another customer 00019115. When I load the data on my script, if I use Distinct then both records show as 00019115, I know both are showing because they both have different Tax rate. If I don't use Distinct then both records appear as 19115. This is causing a problem with my key because QlikView is merging both records and either eliminating the '0' or adding the '0'. I tried adding the record number to see if this will make a difference and I got the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Distinct&lt;BR /&gt; RecNo(), account , store, tax1, tax2 FROM Customer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can somebody help me solve this please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hugo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 21:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967312#M951456</guid>
      <dc:creator />
      <dc:date>2015-12-07T21:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView mergin data in Error</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967313#M951457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the text() function when loading the customer ID. This forces QlikView to forget the numerical representation and keep the string representation (both 19115 and 00019115).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An easier (for you at least) method would be to prefix all customer id's everywhere with a character or a string &lt;BR /&gt;(e.g. &lt;SPAN style="font-family: 'courier new', courier;"&gt;'C' &amp;amp; CustomerID&lt;/SPAN&gt;). This - again - forces QlikView to not try treating customer IDs as numbers but as strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. It's not the SELECT that is mistreating your data. It's QlikView that is doing this, even without an explicit preceding LOAD. Add a preceding LOAD with a text() call for every field you want to keep as a string, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Customers:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD RowNo() AS RNo, text(account) AS account, store, tax1, tax2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT account, store, tax1, tax2 FROM Customer;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 22:39:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967313#M951457</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-07T22:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView mergin data in Error</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967314#M951458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank so much Peter, I have been trying to solve this for quite a few hours on my own without any luck. Your sample code works perfect and your explanation also help me identify other areas where my code needs to be changed to make sure QlikView treat those fields as strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 14:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-mergin-data-in-Error/m-p/967314#M951458</guid>
      <dc:creator />
      <dc:date>2015-12-08T14:22:03Z</dc:date>
    </item>
  </channel>
</rss>

