<?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: Fetching data from SQL giving more than it should in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513836#M36620</link>
    <description>&lt;P&gt;Looks like your are running a Preceding Load statement in QS which is not needed if you are not making any transformations of the data coming from SQL Select statement.&lt;/P&gt;&lt;P&gt;Try removing:&amp;nbsp; Load * ;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 17:57:45 GMT</pubDate>
    <dc:creator>CathyRDuvall</dc:creator>
    <dc:date>2018-11-28T17:57:45Z</dc:date>
    <item>
      <title>Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513820#M36617</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have a strange case and I am unable to figure out what is going wrong.&lt;/P&gt;&lt;P&gt;I have one SQL query which I run in Teradata client and it returns me 516851 rows and when I run same SQL query in Qlik Sense Ii fetches 517543.&lt;/P&gt;&lt;P&gt;below is the query which run -&lt;/P&gt;&lt;P&gt;select Ss_Dt_Uid,Mnth_Uid,KPI_Group3 as KPI_Group2,Scorecard_Dealer_id as Dealer_Cd,Sum(Measure1) as Measure ,Sum(Total_Promotors) as Total_Promotors,Sum(Total_Detractors) as Total_Detractors&lt;BR /&gt;,Sum(Closing_Base_Me) as Closing_Base_Me ,Sum(Closing_Base_Daily) as Closing_Base_Daily ,Sum(Smart_Device_Sales) as Smart_Device_Sales,Sum(VAS_Addressable) as VAS_Addressable ,Sum(Total_Neutrals) as Total_Neutrals, j4u_band from mi_datalab.sg_qlik_pigex3&lt;BR /&gt;group by Ss_Dt_Uid,Mnth_Uid,KPI_Group3,j4u_band,Scorecard_dealer_id&lt;BR /&gt;where dealer_cd not in&lt;BR /&gt;( select distinct B.Dealer_cd from mi_datalab.nv_channel_info A&lt;BR /&gt;inner join&lt;BR /&gt;(sel distinct dealer_cd from mi_datalab.sg_qlik_pigex3 ) B&lt;BR /&gt;on A.Dealer_cd = B.Dealer_cd&lt;BR /&gt;where A.Sub_Channel like '%pop%' or A.Sub_Channel like '%canv%')&lt;BR /&gt;and mnth_uid &amp;gt; '201803'&amp;nbsp; and Ss_Dt_Uid &amp;lt;= (select max(Ss_Dt_Uid)-3 from mi_datalab.sg_qlik_pigex3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not loading any other table in qlik just this SQL so no chance of concatenate or join or something...&lt;/P&gt;&lt;P&gt;I don't know what I am doing wrong here ? Attaching some snapshots...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SQL load in Teradata" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1223i96747643427F61A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="SQL load in Teradata" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;SQL load in Teradata&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SQL load in Qlik Sense" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1224iF9AB99D980EEDE7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="SQL load in Qlik Sense" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;SQL load in Qlik Sense&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1225iB028F3723DB5DA06/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513820#M36617</guid>
      <dc:creator>sajalgour2309</dc:creator>
      <dc:date>2024-11-16T21:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513835#M36619</link>
      <description>&lt;P&gt;Are you sure that you're querying exactly the same database? And that in both cases you're querying the same data set? There are no records that you can't see in your session because of transactions that were commited after you started your session? No concurrency issues etc?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 17:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513835#M36619</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-11-28T17:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513836#M36620</link>
      <description>&lt;P&gt;Looks like your are running a Preceding Load statement in QS which is not needed if you are not making any transformations of the data coming from SQL Select statement.&lt;/P&gt;&lt;P&gt;Try removing:&amp;nbsp; Load * ;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 17:57:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1513836#M36620</guid>
      <dc:creator>CathyRDuvall</dc:creator>
      <dc:date>2018-11-28T17:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1514710#M36689</link>
      <description>&lt;P&gt;I have tried removing load* but still same. But if I remove the date parameter (last line of SQL where I say mnth_uid &amp;gt;201803 ) it works...&lt;/P&gt;&lt;P&gt;only removing this part(and mnth_uid &amp;gt; '201803'&amp;nbsp; and Ss_Dt_Uid &amp;lt;= (select max(Ss_Dt_Uid)-2 from mi_datalab.sg_qlik_pigex3))&lt;/P&gt;&lt;P&gt;I have checked again and again it is same database same query and no other table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 09:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1514710#M36689</guid>
      <dc:creator>sajalgour2309</dc:creator>
      <dc:date>2018-11-30T09:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1514947#M36703</link>
      <description>&lt;P&gt;Please check out code attached for QS below.&amp;nbsp; There are comments that explain what you need to change between coding in SQL and QS.&amp;nbsp; There was no way that I could test this on my system so send me the error message if you get one.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1514947#M36703</guid>
      <dc:creator>CathyRDuvall</dc:creator>
      <dc:date>2018-11-30T14:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1515561#M36722</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried your script. Exact script was not working but I have got the idea what you want or trying to do here. I have changed my script as per your suggestion and it works.&lt;/P&gt;&lt;P&gt;But I am still confused and don't why this is happening ? I used to think that Qlik doesn't do anything just pass your SQL script to your database but I don't think it is happening here...?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sajal&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 13:17:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1515561#M36722</guid>
      <dc:creator>sajalgour2309</dc:creator>
      <dc:date>2018-12-03T13:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from SQL giving more than it should</title>
      <link>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1515571#M36723</link>
      <description>&lt;P&gt;The coding is different in QS then it is for SQL.&amp;nbsp; Please take a moment to explore this link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/November2018/Content/Sense_Helpsites/Tutorials/Tutorials-scripting-beginners.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/November2018/Content/Sense_Helpsites/Tutorials/Tutorials-scripting-beginners.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Good luck and don't hesitate to ask future questions.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 13:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Fetching-data-from-SQL-giving-more-than-it-should/m-p/1515571#M36723</guid>
      <dc:creator>CathyRDuvall</dc:creator>
      <dc:date>2018-12-03T13:25:41Z</dc:date>
    </item>
  </channel>
</rss>

