<?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: Load from QVD gives different values compared to source db table in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29149#M203</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest that you used a &lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt; to load from the database and storing this result as QVD. This meant something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geography:&lt;/P&gt;&lt;P&gt;load Type, text(Code) as Code;&lt;/P&gt;&lt;P&gt;select * from Geography where ....;&lt;/P&gt;&lt;P&gt;store Geography into Geography.qvd (qvd);&lt;/P&gt;&lt;P&gt;drop tables Geography;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geography:&lt;/P&gt;&lt;P&gt;load * from Geography.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you should get a consistent output respectively the data like they are transferred from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2018 07:07:30 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2018-04-13T07:07:30Z</dc:date>
    <item>
      <title>Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29146#M200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope somebody here can help me. I am re-writing a QS application to use QVD files in stead of reading directly from the database. I come across some very strange behaviour while doing that. Probably the strangest is the following. I have a table in an Oracle 11 database. I have a field called 'GEOGRAPHY_CODE' which has datatype VARCHAR2(200 Char) at database level. There are 67 rows for the specific geography I am looking for with values 01 - 66 + 99. When I query the database it returns 67 rows with for all of them 2 character values (which are numeric chars), as it should be. However, when I store this table into a QVD and then load from that QVD, I get 67 rows as expected, but some of the values are all of a sudden 3 characters in stead of 2. But not all of them..... I cannot find any logic in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Among the same lines, the tables I am using have ID fields (all NUMBER(16) on database level). When in the LOAD from the QVD I match this field using the WildMatch() function, for some tables I get a match (no matter whether I use a constant or a variable in the function), and for others I don't, whereas on database level (and even visually) the field contains the exact same value as the value I am matching against.&lt;/P&gt;&lt;P&gt;As it seems something is not working as I would expect it to. Anybody got any thoughts on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 14:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29146#M200</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-12T14:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29147#M201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you post some screenshots that might be helpful to understand more clearly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 16:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29147#M201</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2018-04-12T16:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29148#M202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this clarifies issue 1 a bit more.... But I believe they are related and have something to do with how Qlik stores/retrieves data from QVD:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Geo Oracle.jpg" class="jive-image image-1" height="320" src="/legacyfs/online/199526_Geo Oracle.jpg" style="height: 319.674px; width: 162px;" width="162" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Geo QS.jpg" class="jive-image image-2" height="297" src="/legacyfs/online/199527_Geo QS.jpg" style="max-width: 620px; height: 296.493px; width: 247px;" width="247" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QVD Store.jpg" class="jive-image image-3" src="/legacyfs/online/199528_QVD Store.jpg" style="height: 97px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QVD Load.jpg" class="image-4 jive-image" height="199" src="/legacyfs/online/199529_QVD Load.jpg" style="height: 199.403px; width: 389px;" width="389" /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 06:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29148#M202</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-13T06:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29149#M203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest that you used a &lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt; to load from the database and storing this result as QVD. This meant something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geography:&lt;/P&gt;&lt;P&gt;load Type, text(Code) as Code;&lt;/P&gt;&lt;P&gt;select * from Geography where ....;&lt;/P&gt;&lt;P&gt;store Geography into Geography.qvd (qvd);&lt;/P&gt;&lt;P&gt;drop tables Geography;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geography:&lt;/P&gt;&lt;P&gt;load * from Geography.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you should get a consistent output respectively the data like they are transferred from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 07:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29149#M203</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-13T07:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29150#M204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read the article, and see the point. However, if I have to do this for every field in every table I load, it would make the script a bit complicated..... I would expect Qlik to correctly evaluate the contents of a field and not, out of nowhere, add data to it with no obvious reason, and inconsistent as well.... &lt;/P&gt;&lt;P&gt;On top of that, I have tried the text(geography_code) and it gives the same result. I could try this while selecting from db before storing, but again, it is a dynamic QVD extractor, that loops through a lot of tables, that contain lots of fields. Having to do a transform on every field is (near to) impossible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 07:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29150#M204</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-13T07:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29151#M205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my experience the loading and interpreting of data worked in Qlik usually quite well and it's rather seldom that there such difficulties. Therefore I believe it will work with the most of your fields without the need to implement a special treatment within the extraction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further to implement a few exceptions within the extraction-routine or maybe to extend the logics that all fields will be loaded as strings or even with a check on the values respectively with an appropriate format-mapping to define the treatment of the fields individually is possible and shouldn't be a real shopstopper.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside this I'm not convinced yet that the problem is really on the qlik-side. Are you absolutely sure that the values within the database are like they are displayed? The visual output could related to formattings be different from the values behind it. Another possible error-source could be the database-driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all it meant I would check which data are transferred into Qlik probably by adding something like this to the sql query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;len(code) as CodeLen&lt;/P&gt;&lt;P&gt;mid(code, 1, 1) as Char1,&lt;/P&gt;&lt;P&gt;ord(mid(code, 1, 1)) as CharNumber1,&lt;/P&gt;&lt;P&gt;mid(code, 2, 1) as Char2,&lt;/P&gt;&lt;P&gt;ord(mid(code, 2, 1)) as CharNumber2,&lt;/P&gt;&lt;P&gt;mid(code, 3, 1) as Char3,&lt;/P&gt;&lt;P&gt;ord(mid(code, 3, 1)) as CharNumber3&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ord() could be called different within your database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 07:59:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29151#M205</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-13T07:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29152#M206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the mean time, I have done some checking with your suggestions. And yes, I have experienced something like this before. The data is definitely correct in the database, as different (query) tools show the same results. When loading the check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="GEO converted.jpg" class="jive-image image-1" src="/legacyfs/online/199522_GEO converted.jpg" style="height: 77px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;and then using this converted field in the visualisation it does show up correctly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="GEO converted display.jpg" class="jive-image image-2" src="/legacyfs/online/199538_GEO converted display.jpg" style="height: 232px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;This leads me to beleive it is an issue with how Qlik stores values in the QVD. Because when I explicitely convert to text when loading from QVD it still shows incorrect. Besides that, explicit conversion would be possible querying the system tables in the database and building a load statement based on that, but that is a lot of development and a workaround for what I consider a bug in Qlik...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 08:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29152#M206</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-13T08:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29153#M207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this the first load within the application where the field GEOGRAPHY_CODE is loaded or are there already other tables which loads this field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 08:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29153#M207</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-13T08:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29154#M208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my test from which the screenprint above is made, this is the first and only load of the field/table. So, no, it does not come from another table where different formatting might be applied &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 08:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29154#M208</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-13T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29155#M209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please do the following twice - one time in an empty application and one time directly below the sql-query without using the preceeding approach and storing it to a qvd (just to be sure):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load * from Geography.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len(fieldvalue('GEOGRAPHY_CODE', recno())) as Len, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(fieldvalue('GEOGRAPHY_CODE', recno())) as String,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(fieldvalue('GEOGRAPHY_CODE', recno())) as Number,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mid(fieldvalue('GEOGRAPHY_CODE', recno()), iterno(), 1) as Char,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ord(mid(fieldvalue('GEOGRAPHY_CODE', recno()), iterno(), 1)) as CharNumber&lt;/P&gt;&lt;P&gt;autogenerate fieldvaluecount('GEOGRAPHY_CODE') &lt;/P&gt;&lt;P&gt;while iterno() &amp;lt;= len(fieldvalue('GEOGRAPHY_CODE', recno()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and display it as table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 11:30:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29155#M209</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-13T11:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29156#M210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for thinking along. I have made a little change to you script to be able to better check some things. Output is surprising, to say the least. It does not seem to be a problem in the QVD storage, but with dataretrieval/display in QS. When I retrieve the same data from db (tried OLE, ODBC, Microsoft driver, Oracle driver) or qvd, the same results are displayed. It seems values are 'confused' between records. Let me try to explain the structure of the data and the issue a bit more in depth. We have 3 geography levels, of which the codes are partially overlapping, partially similar. The codes are numeric values, stored as varchar in the database. When querying the database directly, the codes are displayed properly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test table db.jpg" class="jive-image image-1" height="258" src="/legacyfs/online/199715_test table db.jpg" style="height: 258px; width: 262.908px;" width="263" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the GEO1 and GEO2 codes are mixed up in QS, but strangely enough, not for all values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test table.jpg" class="jive-image image-2" src="/legacyfs/online/199716_test table.jpg" style="height: 418px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;The wierdest thing is that QS reports the field as 3 positions for the faulty values, but then iterates only 2 chars in the script Marcus gave me.&lt;/P&gt;&lt;P&gt;When explicitely converting datatypes while loading and storing the QVD, the results from teh load from the QVD are displayed correctly:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test table conversion.jpg" class="jive-image image-3" src="/legacyfs/online/199721_test table conversion.jpg" style="height: 575px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Because it is explicitely converted to text, apparently QS can't translate it back to a number, which is fine in this case.&lt;/P&gt;&lt;P&gt;I have found a way to automatically explicitely concert types by building a load statement based on the ALL_TAB_COLUMS system table in Oracle, however, this remains a workaround, and I consider filing this as a bug (if only I knew how and where &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt; ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TmpCols:&lt;/P&gt;&lt;P&gt;SQL SELECT COLUMN_NAME,DATA_TYPE FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = '$(sTableName)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET z = NoOfRows('TmpCols')-1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET sLoad = 'LOAD ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 0 to $(z)&lt;/P&gt;&lt;P&gt;LET sColName = peek('COLUMN_NAME',$(i),'TmpCols');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET sDataType = peek('DATA_TYPE',$(i),'TmpCols');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET sLoad = sLoad &amp;amp; if(match(sDataType,'DATE','TIMESTAMP(6)','TIMESTAMP(6) WITH LOCAL TIME ZONE') &amp;gt; 0,'date(',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(wildmatch(sDataType,'NUMBER*') &amp;gt; 0,'num(','text(')) &amp;amp; sColName &amp;amp; ') as ' &amp;amp; sColName &amp;amp; ', ';&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET sLoad = mid(sLoad,1,len(sLoad)-2) &amp;amp; ';';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Tmp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;$(sLoad);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SQL SELECT * FROM $(sTableName) WHERE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.....;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;STORE * from Tmp INTO '$(sQVDTrgFolder)$(sFilePrefix)NEXXUSMIDEMO_GEOGRAPHY.QVD' (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;DROP TABLE Tmp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It will slow down the QVD creation because we have to loop through every column of every table, but at least the results are correct....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;HP !&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 09:06:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29156#M210</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-16T09:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29157#M211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's a good solution to ensure that each field could be loaded and stored as it should. Especially as I wouldn't expect a quite significantly increasing of the load-times because querying the fieldnames and formattings from the db systemtables and building a load-statement on the fly within the loop shouldn't be take very long. Also the additionally transformations within the preceeding load shouldn't add a significantly amount of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like above mentioned with the most fields there shouldn't be problems by the data-interpretation even or just because Qlik has no datatypes only numeric- or string-fields respectively mixed fields. Problems occur if there are leading spaces or zeros or similar (I know that leading + or - signs lead to a numeric interpretation and probably there are further cases).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essential how Qlik interprets the data is the first loaded value of each field. This meant adjusting the load-order either within the load or maybe in a foregoing dummy-load will have an effect. You could comprehend it with the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t0:&lt;/P&gt;&lt;P&gt;load text('abc') as F1 autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t1:&lt;/P&gt;&lt;P&gt;load *, rowno() as RowNo inline [&lt;/P&gt;&lt;P&gt;F1, F2&lt;/P&gt;&lt;P&gt;1, 1&lt;/P&gt;&lt;P&gt;01, 01&lt;/P&gt;&lt;P&gt;001, 001&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop tables t0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which leads (in QlikView but AFAIK Sense should be the same) to this result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/199739_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;If an approach like this one worked in your case and there aren't too many "problematic" fields you could consider to skip your load-on-the-fly logic and just handle these fields within the application with such a "special" treatment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 12:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29157#M211</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-16T12:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Load from QVD gives different values compared to source db table</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29158#M212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/27943"&gt;marcus_sommer&lt;/A&gt;‌ Thank you for all your time and suggestions! The solution with querying the system tables works for me, so I guess that is the way to go for me. Still think it is a bug though &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second issue I had, the solution was out here on the forum, but (re) post it here, just in case somebody is looking &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value in the ID field is a large number, and the text representation was in scientific notation. (Mix)Match is a string comparison function so the string I was matching did not match the scientific notation. However&lt;/P&gt;&lt;P&gt;text(&lt;STRONG&gt;num(&amp;lt;id-field&amp;gt;,(dec)&lt;/STRONG&gt;) did the job. It converts scientific notation to 'normal' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 09:45:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-from-QVD-gives-different-values-compared-to-source-db-table/m-p/29158#M212</guid>
      <dc:creator>happydays1967</dc:creator>
      <dc:date>2018-04-17T09:45:20Z</dc:date>
    </item>
  </channel>
</rss>

