<?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 Using the WHERE Clause in an ODBC connection string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423883#M696030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;Can anybody confirm whether or not I can use a WHERE clause in an ODBC connection? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;I am able to connect to a MS Access Database and return all values as per below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\hayetom\Qlikview\Examples\Product.accdb];&lt;/P&gt;&lt;P&gt;LOAD `Product_ID`,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `Product_Line`;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM `DIM_Prod`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which returns:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="163"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="18" width="82"&gt;Product_ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="81"&gt;Product_Line&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;VL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;VL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;5&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;6&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;CD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;7&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;CD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;8&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;EF&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I only want to return rows Where the Product_Line is either 'VL' or 'AB'. I have tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\hayetom\Qlikview\Examples\Product.accdb];&lt;/P&gt;&lt;P&gt;LOAD `Product_ID`,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `Product_Line`;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM `DIM_Prod` &lt;STRONG&gt;WHERE (Product_ID = 'VL' or Product_ID = 'AB');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I appreciate that I can bring all the rows in and then limit my selection on the resident Load BUT I want to limit the data that is brought in the qvw to begin with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Apr 2013 16:34:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-04T16:34:20Z</dc:date>
    <item>
      <title>Using the WHERE Clause in an ODBC connection string</title>
      <link>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423883#M696030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;Can anybody confirm whether or not I can use a WHERE clause in an ODBC connection? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;I am able to connect to a MS Access Database and return all values as per below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\hayetom\Qlikview\Examples\Product.accdb];&lt;/P&gt;&lt;P&gt;LOAD `Product_ID`,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `Product_Line`;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM `DIM_Prod`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which returns:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="163"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="18" width="82"&gt;Product_ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="81"&gt;Product_Line&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;VL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;VL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;5&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;6&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;CD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;7&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;CD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: medium none;"&gt;8&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;EF&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I only want to return rows Where the Product_Line is either 'VL' or 'AB'. I have tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\hayetom\Qlikview\Examples\Product.accdb];&lt;/P&gt;&lt;P&gt;LOAD `Product_ID`,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `Product_Line`;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM `DIM_Prod` &lt;STRONG&gt;WHERE (Product_ID = 'VL' or Product_ID = 'AB');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I appreciate that I can bring all the rows in and then limit my selection on the resident Load BUT I want to limit the data that is brought in the qvw to begin with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 16:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423883#M696030</guid>
      <dc:creator />
      <dc:date>2013-04-04T16:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WHERE Clause in an ODBC connection string</title>
      <link>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423884#M696031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Try this for your where clause.&lt;/P&gt;&lt;P&gt;where Product_ID in('VL','AB') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 17:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423884#M696031</guid>
      <dc:creator>Larry_Aaron</dc:creator>
      <dc:date>2013-04-04T17:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WHERE Clause in an ODBC connection string</title>
      <link>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423885#M696032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try referring to the field as it appears in the SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;`Product_ID`&lt;/SPAN&gt; in('VL','AB')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 18:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423885#M696032</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-04-04T18:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using the WHERE Clause in an ODBC connection string</title>
      <link>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423886#M696033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using Product_Line in your Where clause, rather than Product_ID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 22:10:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-the-WHERE-Clause-in-an-ODBC-connection-string/m-p/423886#M696033</guid>
      <dc:creator />
      <dc:date>2013-04-04T22:10:36Z</dc:date>
    </item>
  </channel>
</rss>

