<?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: Inner &amp; Left Join/Keep in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934005#M977936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought about autonumber option to combine the two primary keys. However, does that work with one field being an integer and one being a varchar? I'll try different options including the autonumber.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Aug 2015 18:19:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-30T18:19:15Z</dc:date>
    <item>
      <title>Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934002#M977933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a below sql query. Could someone please explain how I can correctly write this in QlikView? I am confused because 'product' table needs to be joined using 2 keys(CustomerID &amp;amp; ProductID). Assume CustomerID is an integer and ProductID is a varchar field. Also, since join makes a table look like one with all the combined fields in table viewer, do you recommend using keep function instead? If I use keep, do I need to drop the fields and table at the end? If so, could someone please provide the best solution to answer all the questions using the below query to convert it into a QlikView code. Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select a.Name, b.CustomerID, c.ProductID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from data a&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;inner join customer b&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on a.CustomerID=b.CustomerID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;left join product c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on &lt;SPAN style="color: #0000ff;"&gt;c.CustomerID=b.CustomerID and c.ProductID=b.ProductID&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where a.Name='James'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and b.CustomerID='1001'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and c.ProductID='501'&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 16:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934002#M977933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-30T16:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934003#M977934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe my suggestion from &lt;A href="https://community.qlik.com/thread/178394"&gt;Subqueries - script&lt;/A&gt;‌ might be useful here, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 16:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934003#M977934</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-30T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934004#M977935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there are many different ways, 2 ways are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- you can use your sql query in QlikView without any changes&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL select a.Name, .......&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- you can load the 3 tables without any joins and Qlik will associate (by name) the tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL select Name, ....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from data;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;customer:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL select .....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from customer;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;product:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL select ....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from product;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then add some listbox (Name, CustomerID, ProductID) to filter the rows you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 17:01:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934004#M977935</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-30T17:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934005#M977936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought about autonumber option to combine the two primary keys. However, does that work with one field being an integer and one being a varchar? I'll try different options including the autonumber.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 18:19:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934005#M977936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-30T18:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934006#M977937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need not to worry about data-types within qlikview: &lt;A href="https://community.qlik.com/qlik-blogpost/2830"&gt;Data Types in QlikView&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 18:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934006#M977937</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-30T18:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934007#M977938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I always preferred to load all the tables using the sql script then just format the columns in qlikview. However, I just wanted to understand how to do it in qlikview. I don't like assuming the result being correct from having qlikview using the automatic association. Automatic association in qlikview does full outer join and that is not what I want. I can load tables separately like u mentioned but I wasn't sure how to link the tables when there are two keys to link the tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 18:28:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934007#M977938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-30T18:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934008#M977939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I can load tables separately like u mentioned but I wasn't sure how to link the tables when there are two keys to link the tables&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the 2 fields (keys) have the same name, QlikView makes a synthetic key; this isn't a problem, your db model still works, but if you still want to remove the syn key you can use autonumber or concat the 2 fields in one&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3064"&gt;Synthetic Keys&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 20:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934008#M977939</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-30T20:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Inner &amp; Left Join/Keep</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934009#M977940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo! I had the 2 keys named the same and it did not create a synthetic key because the two table were inner joined. I looked at the table viewer and it only displayed one table with the desired fields all in that table. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 01:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Left-Join-Keep/m-p/934009#M977940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-01T01:15:04Z</dc:date>
    </item>
  </channel>
</rss>

