<?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: Left-join two loaded tables in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877657#M10057</link>
    <description>&lt;P&gt;&lt;STRONG&gt;// load the first table table2 in Qlik (data)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LIB CONNECT ....;&lt;/P&gt;
&lt;P&gt;[data]:&lt;/P&gt;
&lt;P&gt;load id, age;&lt;/P&gt;
&lt;P&gt;SELECT......;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// load the second table table1 in Qlik (transactions)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LIB CONNECT ....;&lt;/P&gt;
&lt;P&gt;[transactions]:&lt;/P&gt;
&lt;P&gt;load date, id;&lt;/P&gt;
&lt;P&gt;SELECT .........;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// left join in Qlik, Qlik syntax, the join is by id field&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (transactions)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOAD id, age&lt;/P&gt;
&lt;P&gt;RESIDENT data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// drop the first table&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DROP TABLE data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 19:06:03 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2022-01-05T19:06:03Z</dc:date>
    <item>
      <title>Left-join two loaded tables</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877537#M10056</link>
      <description>&lt;P&gt;With the following two tables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'database';

LOAD id,age

[data]:
SELECT id, age from table2;



LIB CONNECT TO 'db';

LOAD date,id;

[transactions]:
SELECT * from table1
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how do I do a left join of "data" onto "transactions"? The &lt;A href="https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/Join.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;is , to be honest, not very usefull&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'database';

LOAD id,age

[data]:
SELECT id, age from table2;



LIB CONNECT TO 'db';

LOAD date,id;

[transactions]:
SELECT * from table1;

[joined_data]:
SELECT * from table1 LEFT JOIN SELECT * from table2;  #&amp;lt;-- join
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I just get "no table table1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877537#M10056</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2022-01-05T15:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Left-join two loaded tables</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877657#M10057</link>
      <description>&lt;P&gt;&lt;STRONG&gt;// load the first table table2 in Qlik (data)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LIB CONNECT ....;&lt;/P&gt;
&lt;P&gt;[data]:&lt;/P&gt;
&lt;P&gt;load id, age;&lt;/P&gt;
&lt;P&gt;SELECT......;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// load the second table table1 in Qlik (transactions)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LIB CONNECT ....;&lt;/P&gt;
&lt;P&gt;[transactions]:&lt;/P&gt;
&lt;P&gt;load date, id;&lt;/P&gt;
&lt;P&gt;SELECT .........;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// left join in Qlik, Qlik syntax, the join is by id field&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (transactions)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOAD id, age&lt;/P&gt;
&lt;P&gt;RESIDENT data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// drop the first table&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DROP TABLE data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 19:06:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877657#M10057</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2022-01-05T19:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Left-join two loaded tables</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877785#M10059</link>
      <description>&lt;P&gt;If you load Transactions first you can do it like this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LIB CONNECT TO 'db';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[transactions]:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SELECT date,id from table1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LIB CONNECT TO 'database';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Left Join (transactions)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SELECT id, age from table2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 04:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877785#M10059</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-01-06T04:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Left-join two loaded tables</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877808#M10060</link>
      <description>&lt;P&gt;Is that then a join of Table1 onto Table2 or the other way round? And how do you then use the "LOAD" to select data from the joined table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 06:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877808#M10060</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2022-01-06T06:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Left-join two loaded tables</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877945#M10066</link>
      <description>&lt;P&gt;What is the outcome of this i.e what is the table-name of the joined data? I cannot see the joined table in the "data model overview"&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 12:49:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877945#M10066</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2022-01-06T12:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Left-join two loaded tables</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877975#M10067</link>
      <description>&lt;P&gt;Here is the difference between SQL Join and Qlik Join.&lt;/P&gt;
&lt;P&gt;In SQL you join two or more tables to create a new table -- the result set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Qlik there are only two tables involved, the target table and the source table (my terms).&amp;nbsp; Rows from the source table update rows in the target table.&amp;nbsp; There is no "new" table as there is in SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TargetTable is a table that has been created by a SQL or Load statement, prior to the Join.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Join (targetTableName)&amp;nbsp; Load&amp;nbsp; * From sourceTable;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;If loading from a database, SQL is used instead of Load. (Load and SQL can be combined in a "preceding load", another topic).&amp;nbsp; So the above abbreviated example could be:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Join (targetTableName)&amp;nbsp; SQL Select&amp;nbsp; * From sourceTable;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Returning to the example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LIB CONNECT TO 'db';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[transactions]:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SELECT date,id from table1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LIB CONNECT TO 'database';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Left Join (transactions)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SELECT id, age from table2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Data from table2 is joined onto the Qlik "transactions" table. The only table you will see in the Data Model viewer is "transactions" and it should have three fields: date, id, age.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table created by&amp;nbsp; "&lt;FONT face="courier new,courier"&gt;SELECT id, age from table2&lt;/FONT&gt;" is a temporary (or anonymous) table that exists only long enough to feed the Join.&lt;/P&gt;
&lt;P&gt;You can find some free foundational courses at&amp;nbsp;&lt;A href="https://learning.qlik.com/" target="_blank"&gt;https://learning.qlik.com/&lt;/A&gt;&amp;nbsp;as well on Udemy.&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 13:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Left-join-two-loaded-tables/m-p/1877975#M10067</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-01-06T13:27:27Z</dc:date>
    </item>
  </channel>
</rss>

