<?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: Can't &amp;quot;SQL Select&amp;quot; from multiple tables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799897#M1034991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you are accessing a DBMS and not a stand alone database on your local machine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 13:47:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-16T13:47:54Z</dc:date>
    <item>
      <title>Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799891#M1034985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been struggling with getting something to work correctly in Qlik Sense. What I'm trying to do is load records from two tables in our Oracle database. One of the tables contains the universe of data that I'm selecting from. The second table represents a key field in the first table that I'm wanting to use to exclude records from the selection query. Whereas I would typically use an IN clause (for example, select * where table1.keyfield not in ('keyfieldvalue1','keyfieldvalue2', etc.)) to exclude the records I don't want, there are more than 1,000 values that I don't want which exceeds the max number of entries allowable using the IN clause. Therefore, I'm wanting to pull the data from the first table where table1.keyfield is not equal to table2.keyfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL this is simple:&lt;/P&gt;&lt;P&gt;Select a.blahblah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.blahblahblah&lt;/P&gt;&lt;P&gt;From table1 a, table2 b&lt;/P&gt;&lt;P&gt;Where a.keyfield != b.keyfield;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet in Qlik Sense I haven't figured out how to even get the following to work. For example, the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A."CODE",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A."DESCRIPTION",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B."CODE",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B."DESCRIPTION"&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM Schema.Table1 as A, Schema.Table2 as B;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generates the following error message when attempting the data load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: S1000, ErrorCode: 933, ErrorMsg: [Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A."CODE",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A."DESCRIPTION",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B."CODE",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B."DESCRIPTION"&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM Schema.Table1 as A, Schema.Table2 as B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with getting this to work or other alternate means to arrive at the desired subset of data would be greatly appreciated!! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 17:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799891#M1034985</guid>
      <dc:creator />
      <dc:date>2015-01-15T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799892#M1034986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that there needs to be a JOIN in your SQL SELECT code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'courier new'; font-size: 14px;"&gt;SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'courier new'; font-size: 14px;"&gt;FROM Orders&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'courier new'; font-size: 14px;"&gt;INNER JOIN Customers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'courier new'; font-size: 14px;"&gt;ON Orders.CustomerID=Customers.CustomerID;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 18:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799892#M1034986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-15T18:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799893#M1034987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the script work when in Oracle Management Studio?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 18:11:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799893#M1034987</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2015-01-15T18:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799894#M1034988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within Oracle SQL Developer the script gives the same 933 error. When I change the "as A" and "as B" wording&amp;nbsp; to remove the word "as" it runs correctly. Yet within Qlik Sense the script &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A."CODE",&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A."DESCRIPTION",&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B."CODE",&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B."DESCRIPTION"&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FROM Schema.Table1 A, Schema.Table2 B&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;results in a "ODBC read failed" message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 18:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799894#M1034988</guid>
      <dc:creator />
      <dc:date>2015-01-15T18:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799895#M1034989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In QlikView, with ODBC and Oracle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works&lt;/P&gt;&lt;P&gt;&lt;EM&gt;select A.EMPNO, B.ENAME&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM TEST.EMP A, TEST.EMP2 B;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this doesn'twork, same field name&lt;/P&gt;&lt;P&gt;&lt;EM&gt;select A.EMPNO, B.EMPNO&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM TEST.EMP A, TEST.EMP2 B;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works&lt;/P&gt;&lt;P&gt;&lt;EM&gt;select A.EMPNO, B.EMPNO &lt;STRONG&gt;B_EMPNO&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM TEST.EMP A, TEST.EMP2 B;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is the same in Sense, alias the field in sql&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 19:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799895#M1034989</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-01-15T19:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799896#M1034990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you ODBC and not OLE DB?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 21:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799896#M1034990</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2015-01-15T21:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799897#M1034991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you are accessing a DBMS and not a stand alone database on your local machine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 13:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799897#M1034991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-16T13:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799898#M1034992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I meant to add "you are accessing a DBMS over a network"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 13:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799898#M1034992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-16T13:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can't "SQL Select" from multiple tables?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799899#M1034993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked for me. I've seen tutorials use 'as' and also exclude it. I believe I read somewhere that it depends on the database your accessing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So yea, leaving out the 'as' and directly aliasing the table immediately after,&amp;nbsp; &lt;/P&gt;&lt;P&gt;i.e. Schema.Table1 t1&lt;/P&gt;&lt;P&gt;works for me, and in case anyone is wondering, I'm using an OLE DB connection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 14:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-t-quot-SQL-Select-quot-from-multiple-tables/m-p/799899#M1034993</guid>
      <dc:creator>richard_cioci</dc:creator>
      <dc:date>2015-12-22T14:50:57Z</dc:date>
    </item>
  </channel>
</rss>

