<?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: I need help to Left Join() 1 table with 2 another different tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646018#M731018</link>
    <description>&lt;P&gt;I thought you'd like to do the opposite, to get a field from tar on the other tables you should do it:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TAR:
SELECT * //Select the fields you want to join
FROM TAR;

T:
SELECT *
FROM T;

LEFT JOIN (T)
SELECT * //Name the fields you want to join on T
RESIDENT TAR;

AMB:
SELECT *
FROM AMB;

LEFT JOIN (AMB)
SELECT * //Name the fields you want to join on AMB
RESIDENT TAR;&lt;/LI-CODE&gt;&lt;P&gt;You can do the same using LOAD instead of RESIDENT, I guess there will be no difference in performance (if both are in QVD).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how to do using LOAD instead of RESIDENT:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;T:
SELECT *
FROM T;

LEFT JOIN (T)
SELECT * //Name the fields you want to join on T
FROM TAR;

AMB:
SELECT *
FROM AMB;

LEFT JOIN (AMB)
SELECT * //Name the fields you want to join on AMB
FROM TAR;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 16:58:58 GMT</pubDate>
    <dc:creator>RuhanLigabue</dc:creator>
    <dc:date>2019-11-12T16:58:58Z</dc:date>
    <item>
      <title>I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1645983#M731015</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i need to Left Join() a table called "TAR" with two different tables called "T" and "AMB".&lt;/P&gt;&lt;P&gt;When i've only one table, i write Left Join (name of table).&lt;/P&gt;&lt;P&gt;Is it possibile? What's the right expression to do this?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mattia&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1645983#M731015</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2024-11-16T19:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1645989#M731016</link>
      <description>&lt;P&gt;Hi Mattia,&lt;/P&gt;&lt;P&gt;In this case I think this will help you, you can switch the * with the field names you want to select and Qlik will join the tables using the same name fields&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TAR:
SELECT *
FROM TAR

LEFT JOIN (TAR)
SELECT *
FROM T;

LEFT JOIN (TAR)
SELECT *
FROM AMB;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 16:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1645989#M731016</guid>
      <dc:creator>RuhanLigabue</dc:creator>
      <dc:date>2019-11-12T16:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1645999#M731017</link>
      <description>&lt;P&gt;Hi Ruhan,&lt;/P&gt;&lt;P&gt;thanks for the suggest.&lt;/P&gt;&lt;P&gt;So, with this expression, i can add 1 or more fields of table TAR to different tables T and AMB?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 16:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1645999#M731017</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-11-12T16:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646018#M731018</link>
      <description>&lt;P&gt;I thought you'd like to do the opposite, to get a field from tar on the other tables you should do it:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TAR:
SELECT * //Select the fields you want to join
FROM TAR;

T:
SELECT *
FROM T;

LEFT JOIN (T)
SELECT * //Name the fields you want to join on T
RESIDENT TAR;

AMB:
SELECT *
FROM AMB;

LEFT JOIN (AMB)
SELECT * //Name the fields you want to join on AMB
RESIDENT TAR;&lt;/LI-CODE&gt;&lt;P&gt;You can do the same using LOAD instead of RESIDENT, I guess there will be no difference in performance (if both are in QVD).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how to do using LOAD instead of RESIDENT:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;T:
SELECT *
FROM T;

LEFT JOIN (T)
SELECT * //Name the fields you want to join on T
FROM TAR;

AMB:
SELECT *
FROM AMB;

LEFT JOIN (AMB)
SELECT * //Name the fields you want to join on AMB
FROM TAR;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 16:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646018#M731018</guid>
      <dc:creator>RuhanLigabue</dc:creator>
      <dc:date>2019-11-12T16:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646033#M731019</link>
      <description>&lt;P&gt;Thanks you so much for the detailed &lt;STRONG&gt;reply.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Tomorrow i'll try and i let you know!!!&lt;/P&gt;&lt;P&gt;Last thing: is it possibile to join the entire table or more fields instead of a single field?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 17:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646033#M731019</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-11-12T17:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646038#M731020</link>
      <description>&lt;P&gt;You will join all the tables on SELECT, if you put a * you will load all fields, or you can do like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;T:
SELECT *
FROM T;

LEFT JOIN (T)
SELECT ID,
       FieldName1,
       FieldName2
RESIDENT TAR;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Then you'll add only ID, FieldName1 and FieldName2 on T&lt;/P&gt;&lt;P&gt;Just make sure to select the field that connects T to TAR otherwise you'll do a Cartesian product&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 17:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646038#M731020</guid>
      <dc:creator>RuhanLigabue</dc:creator>
      <dc:date>2019-11-12T17:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646040#M731021</link>
      <description>&lt;P&gt;Thank you Ruhan!!!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 17:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646040#M731021</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-11-12T17:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646041#M731022</link>
      <description>&lt;P&gt;You will join all the tables on SELECT, if you put a * you will load all fields, or you can do like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;T:
SELECT *
FROM T;

LEFT JOIN (T)
SELECT ID,
       FieldName1,
       FieldName2
FROM TAR;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Then you'll add only ID, FieldName1 and FieldName2 on T&lt;/P&gt;&lt;P&gt;Just make sure to select the field that connects T to TAR otherwise you'll do a Cartesian product&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 17:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1646041#M731022</guid>
      <dc:creator>RuhanLigabue</dc:creator>
      <dc:date>2019-11-12T17:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1647496#M731023</link>
      <description>&lt;P&gt;Hi Ruhan e sorry for the delay.&lt;/P&gt;&lt;P&gt;i've tried your suggest but i'm in trouble. I think i didn't completely understand your solution.&lt;/P&gt;&lt;P&gt;So, here is attached a sample data file.&lt;/P&gt;&lt;P&gt;The output i want is the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;all the fields of table "TAR" must be add to both tables "AMB2" and "DET"&lt;/LI&gt;&lt;LI&gt;all the fields of table "RES" must be add to both tables "AMB1" and "TES"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Please, could you bring me to the right direction?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mattia&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 13:45:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1647496#M731023</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-11-15T13:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1648006#M731024</link>
      <description>&lt;P&gt;Hey Mattia,&lt;/P&gt;&lt;P&gt;I guess this code can work for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/*
all the fields of table "TAR" must be add to both tables "AMB2" and "DET"
*/
TAR:
LOAD * INLINE [
    CODE, VAL
    897, 5
    576, 10
    253, 15
    543, 20
    923, 25
];

AMB2:
LOAD * INLINE [
    COUNT, PROG, CODE, NUM
    00000001, 1, 897, 1
    00000001, 1, 576, 2
    00000001, 2, 253, 3
    00000002, 1, 897, 1
    00000002, 1, 543, 2
    00000003, 1, 923, 1
];
LEFT JOIN (AMB2)
LOAD *
RESIDENT TAR;

DET:
LOAD * INLINE [
    COUNT, CODE, NUM
    00000001, 897, 1
    00000001, 576, 2
    00000001, 253, 3
    00000002, 897, 1
    00000002, 543, 2
    00000003, 923, 1
];
LEFT JOIN (DET)
LOAD *
RESIDENT TAR;&lt;/LI-CODE&gt;&lt;P&gt;This code will load TAR and join it in the 2 tables (AMB2 and DET) using the code the only problem I can see is a lot of synthetic keys (fields with the same name in multiple tables) you can use alias to fix it.&lt;/P&gt;&lt;P&gt;And for the next 2 joins you can follow the logic in this script above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 14:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1648006#M731024</guid>
      <dc:creator>RuhanLigabue</dc:creator>
      <dc:date>2019-11-18T14:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to Left Join() 1 table with 2 another different tables</title>
      <link>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1648019#M731025</link>
      <description>&lt;P&gt;Thank you Ruhan. Your solution works!&lt;/P&gt;&lt;P&gt;Please, if you can, i need help also for these open threads:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Scripting/How-can-i-Left-Join-multiple-tables/td-p/1647823" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Scripting/How-can-i-Left-Join-multiple-tables/td-p/1647823&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Scripting/How-can-i-insert-an-expression-in-other-load/td-p/1647824" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Scripting/How-can-i-insert-an-expression-in-other-load/td-p/1647824&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Mattia&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 14:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-need-help-to-Left-Join-1-table-with-2-another-different-tables/m-p/1648019#M731025</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-11-18T14:59:16Z</dc:date>
    </item>
  </channel>
</rss>

