<?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 Load Sentence changes SQL values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355653#M705022</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;I have to read the field "survey_sk" and "fronts" from SQL2005 database. "survey_sk" is an integer of 18 positions. If I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; survey_sk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fronts&lt;/P&gt;&lt;P&gt;From Table&lt;/P&gt;&lt;P&gt;where survey_sk='634610963568975007';&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;QV Loads the registers with this survey_sk (i know with the sum(fronts) expression), but the survey_sk field is empty. Now, if I try;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(survey_sk,'##################') as survey_sk&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; survey_sk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fronts&lt;/P&gt;&lt;P&gt;From Table&lt;/P&gt;&lt;P&gt;where survey_sk='634610963568975007';&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The same data is loaded, but survey_sk='63461096356897 4980' (instead of 63461096356897 5007)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Now, if I put the where in Load instead of Select, QV doesn't find any register. Is Clear that Load sentence modifyes the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Any suggestion to load correct data? Im using QV11.00.11282.0 SR1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2012 22:11:42 GMT</pubDate>
    <dc:creator>sebastiandperei</dc:creator>
    <dc:date>2012-06-15T22:11:42Z</dc:date>
    <item>
      <title>Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355653#M705022</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;I have to read the field "survey_sk" and "fronts" from SQL2005 database. "survey_sk" is an integer of 18 positions. If I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; survey_sk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fronts&lt;/P&gt;&lt;P&gt;From Table&lt;/P&gt;&lt;P&gt;where survey_sk='634610963568975007';&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;QV Loads the registers with this survey_sk (i know with the sum(fronts) expression), but the survey_sk field is empty. Now, if I try;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(survey_sk,'##################') as survey_sk&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; survey_sk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fronts&lt;/P&gt;&lt;P&gt;From Table&lt;/P&gt;&lt;P&gt;where survey_sk='634610963568975007';&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The same data is loaded, but survey_sk='63461096356897 4980' (instead of 63461096356897 5007)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Now, if I put the where in Load instead of Select, QV doesn't find any register. Is Clear that Load sentence modifyes the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Any suggestion to load correct data? Im using QV11.00.11282.0 SR1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 22:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355653#M705022</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-06-15T22:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355654#M705023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, QV works with a limit of 14 digits for a number. &lt;/P&gt;&lt;P&gt;You can get some ways to handle it here: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/223100#223100" title="http://community.qlik.com/message/223100#223100"&gt;http://community.qlik.com/message/223100#223100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you can also try this: &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; evaluate(survey_sk) as survey_sk&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; survey_sk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fronts&lt;/P&gt;&lt;P&gt;From Table&lt;/P&gt;&lt;P&gt;where survey_sk='634610963568975007';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2012 03:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355654#M705023</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2012-06-16T03:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355655#M705024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich!, but I don't care if QV takes this field as Text...&amp;nbsp; In fact, I have tested it with Text().... And nothing happens...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Evaluate()", will give me the field as Integer? And in this Integer, what about the 14 digit limit? This Integer, is in normal format or in scientific notation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2012 22:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355655#M705024</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-06-16T22:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355656#M705025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally, i used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *;&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAST (survey_sk as Char) as survey_sk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fronts&lt;/P&gt;&lt;P&gt;From Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As this way, QV reads the field with correct content, as Text, but correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 18:12:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355656#M705025</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-06-18T18:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355657#M705026</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;If you try the following script, you will create two fields:&lt;/P&gt;&lt;P&gt;T:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123456789123456789&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Evaluate(Test) as EvalTest, Test resident T;&lt;/P&gt;&lt;P&gt;drop table T; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field Test is just a string but EvalTest is a number. If you include it in a list, you can see all the 18 digits, but when you write some expression with it, you will get the scientific notation (e.g. sum(EvalTest) ). So, I believe you are actually losing precision due to this notation, although QV can keep the original format when presenting just the field. &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;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 13:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355657#M705026</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2012-06-19T13:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355658#M705027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erich, Thanks for your interest in this topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, I don't want to make expressions with this field, and because of it is better to have it as string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if we would need like a number, this thread could be useful for the comunity. So, I tryed with your suggestion, and the field has only Nulls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the problem is in the transition of SQL Select to Load, because the "where" clause works good, the Load sentence keeps taking the field like a number and, because of its &amp;gt;14 digits, couldn't take like that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I can't understand why works well since the data comes from INLINE, and not from Select sentence. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the SQL base, and the field is "BigInt" type. Using "CAST", I format it to "Char" type. I can now take it like number, with Evaluate or simply Num function. Did you used Evaluate with SQL data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 14:06:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355658#M705027</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-06-19T14:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355659#M705028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I used before, but I'm not sure the original database datatype. &lt;/P&gt;&lt;P&gt;It's more difficult when there are different results in a inline and a real database... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a last suggestion, could you please try something like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Evaluate(text(Test)) as EvalTest, Test resident T;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 14:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355659#M705028</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2012-06-19T14:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Load Sentence changes SQL values</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355660#M705029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Erich, i tryed this but is the same: Load doesn''t receive data from Select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, Load isn't the problem, because using CAST in Select, any function in Load works right&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 17:10:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Sentence-changes-SQL-values/m-p/355660#M705029</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-06-19T17:10:31Z</dc:date>
    </item>
  </channel>
</rss>

