<?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: Using where exists in sql with data from excel table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131603#M764340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sarah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you can create min and max variables and pass them through SQL using where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Carlos M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2018 20:37:01 GMT</pubDate>
    <dc:creator>CarlosAMonroy</dc:creator>
    <dc:date>2018-07-26T20:37:01Z</dc:date>
    <item>
      <title>Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131600#M764337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to limit my sql load from the database based on fields that exists in an excel table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel Table:&lt;/P&gt;&lt;P&gt;20180101&lt;/P&gt;&lt;P&gt;20180201&lt;/P&gt;&lt;P&gt;20180301&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Database Table:&lt;/P&gt;&lt;P&gt;Name&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to limit the names that get pulled based on Date which is limited to Dates in the excel table. I have a very large amount of data in the SQL Database table and so using a WHERE EXISTS clause in the Qlikview load section would still require a large amount of time. &lt;/P&gt;&lt;P&gt;Something like the below, but I understand my exisiting format doesn't work because the WHERE EXIST function does not work this way in SQL.&lt;/P&gt;&lt;P&gt;I also can write out each date in the Excel Table using&amp;nbsp; IN () because the dates that exist in the excel file change based on the current date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;FROM ExcelTable;&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;Name &lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;From Database.Table&lt;/P&gt;&lt;P&gt;WHERE EXISTS (Date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate the help in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131600#M764337</guid>
      <dc:creator>sarahshong</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131601#M764338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM ExcelTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;WHERE EXISTS (Date);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL Select&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Name&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From Database.Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 19:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131601#M764338</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-07-26T19:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131602#M764339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwarath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to limit the amount of data that is originally being pulled from the SQL database because the size of the database is so large. If I use the where exists function in the Qlikview Load like you've shown above, it will still take a very long time. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 20:22:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131602#M764339</guid>
      <dc:creator>sarahshong</dc:creator>
      <dc:date>2018-07-26T20:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131603#M764340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sarah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you can create min and max variables and pass them through SQL using where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Carlos M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 20:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131603#M764340</guid>
      <dc:creator>CarlosAMonroy</dc:creator>
      <dc:date>2018-07-26T20:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131604#M764341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure of better way of doing this, but probably two suggestions can be like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import your excel data into your database and create a table in your SQL database. Then use like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;1st Way:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL Select&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Name&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From Database.Table&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13.3333px; font-style: inherit;"&gt;WHERE Date IN (SELECT Date FROM yourexcelFilename)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;2nd Way: Refering to Carlos suggestion you can try like&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel:&lt;/P&gt;&lt;P&gt;LOAD Date&lt;/P&gt;&lt;P&gt;FROM ExcelTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMaxDate:&lt;/P&gt;&lt;P&gt;LOAD Min(Date) AS MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(Date) AS MaxDate&lt;/P&gt;&lt;P&gt;Resident Excel;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vMinDate = Peek('MinMaxDate', MinDate);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SET vMaxDate = Peek('MinMaxDate', MaxDate);&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 Tables MinMaxDate, Excel;&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;LOAD *;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SQL Select Date, Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FROM Database.tablename&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;WHERE Date Between '$(vMinDate)' AND '$(vMaxDate)' ;&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;Modify accordingly if you face any syntax errors or issues. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 20:54:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131604#M764341</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-07-26T20:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131605#M764342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the suggestions. I ended up doing a hybrid and creating a variable for each date in my excel table using the peek function. Then I applied the variable in the SQL WHERE IN() clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I couldn't do a min/max was because the range of the dates was too large.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2018 16:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131605#M764342</guid>
      <dc:creator>sarahshong</dc:creator>
      <dc:date>2018-07-27T16:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131606#M764343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you create one variable for each date? How many dates were there to look for in IN clause?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2018 16:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131606#M764343</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-07-27T16:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using where exists in sql with data from excel table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131607#M764344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, 1 variable for each date. There were only 6 rolling dates in the Excel file. Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:20:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-where-exists-in-sql-with-data-from-excel-table/m-p/131607#M764344</guid>
      <dc:creator>sarahshong</dc:creator>
      <dc:date>2018-07-27T18:20:21Z</dc:date>
    </item>
  </channel>
</rss>

