<?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 using between in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682799#M51981</link>
    <description>&lt;P&gt;I didn't quite get it, bu maye be :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FCT_TRANSACTION:
LOAD * Inline [
TRANSACTION_NO, CONTRACT_CD, TRANSACTION_DT
10000,PM1,12/10/2018
20000,PM1,12/10/2019
30000,PM7,12/10/2019
];
left join
PRODUCT_GROUP:
LOAD * Inline [
CONTRACT_CD, FROM_DATE, TO_DATE,PRODUCT_GROUP_ID
PM1,1/1/2018,12/31/2018, 100
PM1,1/1/2019,1/1/2099,101
PM2,1/1/2019,1/1/2099,102
];
Result:
Noconcatenate
load * resident FCT_TRANSACTION
Where (Date(TRANSACTION_DT)&amp;gt;=Date(FROM_DATE) and Date(TRANSACTION_DT)&amp;lt;=Date(TO_DATE)) or (not isnull(CONTRACT_CD) and (isnull(TO_DATE) and isnull(FROM_DATE)));
drop table FCT_TRANSACTION;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 781px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29742iB5FFFC26913AFB42/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2020 09:32:42 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-03-09T09:32:42Z</dc:date>
    <item>
      <title>Left join using between</title>
      <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682619#M51956</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;New to Qlik and a very basic question to ask.&lt;/P&gt;&lt;P&gt;How to achieve the following in Qlik load script.&lt;/P&gt;&lt;P&gt;select a.*,&amp;nbsp; b.X&amp;nbsp; from table1&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join table2&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where table1&amp;nbsp;&amp;nbsp;.A = table2 .A&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and a.time between b.starttime and b.endtime&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682619#M51956</guid>
      <dc:creator>DebP</dc:creator>
      <dc:date>2021-12-20T21:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Left join using between</title>
      <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682649#M51959</link>
      <description>&lt;P&gt;can you share a sample data from table A and B to propose the exact solution&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 16:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682649#M51959</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-03-07T16:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Left join using between</title>
      <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682681#M51963</link>
      <description>&lt;P&gt;Hi, please see the load script below. Getting 4 records in the final table, whereas expected is 2 records. Thanks&lt;/P&gt;&lt;P&gt;FCT_TRANSACTION:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;TRANSACTION_NO, CONTRACT_CD, TRANSACTION_DT&lt;BR /&gt;10000,PM1,12/10/2018&lt;BR /&gt;20000,PM1,12/10/2019&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;PRODUCT_GROUP:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;CONTRACT_CD, FROM_DATE, TO_DATE,PRODUCT_GROUP_ID&lt;BR /&gt;PM1,1/1/2018,12/31/2018, 100&lt;BR /&gt;PM1,1/1/2019,1/1/2099,101&lt;BR /&gt;PM2,1/1/2019,1/1/2099,102&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Left Join (FCT_TRANSACTION)&lt;BR /&gt;LOAD&lt;BR /&gt;* Resident PRODUCT_GROUP;&lt;/P&gt;&lt;P&gt;left JOIN (FCT_TRANSACTION)&lt;BR /&gt;LOAD TRANSACTION_DT,&lt;BR /&gt;FROM_DATE as F,&lt;BR /&gt;TO_DATE as T&lt;BR /&gt;RESIDENT FCT_TRANSACTION&lt;BR /&gt;WHERE CONTRACT_CD=CONTRACT_CD and TRANSACTION_DT &amp;gt;= FROM_DATE AND TRANSACTION_DT &amp;lt; TO_DATE&lt;BR /&gt;;&lt;BR /&gt;drop table PRODUCT_GROUP;&lt;BR /&gt;drop fields FROM_DATE,TO_DATE;&lt;BR /&gt;rename field F to FROM_DATE;&lt;BR /&gt;rename field T to TO_DATE;&lt;BR /&gt;exit script;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 10:39:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682681#M51963</guid>
      <dc:creator>DebP</dc:creator>
      <dc:date>2020-03-08T10:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Left join using between</title>
      <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682686#M51964</link>
      <description>&lt;P&gt;maye be thisi :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FCT_TRANSACTION:
LOAD * Inline [
TRANSACTION_NO, CONTRACT_CD, TRANSACTION_DT
10000,PM1,12/10/2018
20000,PM1,12/10/2019
];
left join
PRODUCT_GROUP:
LOAD * Inline [
CONTRACT_CD, FROM_DATE, TO_DATE,PRODUCT_GROUP_ID
PM1,1/1/2018,12/31/2018, 100
PM1,1/1/2019,1/1/2099,101
PM2,1/1/2019,1/1/2099,102
];
Result:
Noconcatenate
load * resident FCT_TRANSACTION
Where Date(TRANSACTION_DT)&amp;gt;=Date(FROM_DATE) and Date(TRANSACTION_DT)&amp;lt;=Date(TO_DATE);
drop table FCT_TRANSACTION;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 947px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29729i745F6EF701F8E2D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 11:10:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682686#M51964</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-03-08T11:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Left join using between</title>
      <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682699#M51968</link>
      <description>&lt;P&gt;Thanks it worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, if i add additional row which is not present in the following&amp;nbsp;PRODUCT_GROUP then&amp;nbsp; in the result table this record will be missed. I need all 3 records in the result table.&lt;/P&gt;&lt;P&gt;FCT_TRANSACTION:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;TRANSACTION_NO, CONTRACT_CD, TRANSACTION_DT&lt;BR /&gt;10000,PM1,12/10/2018&lt;BR /&gt;20000,PM1,12/10/2019&lt;BR /&gt;30000,PM7,12/10/2019&lt;BR /&gt;];&lt;BR /&gt;left join&lt;BR /&gt;PRODUCT_GROUP:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;CONTRACT_CD, FROM_DATE, TO_DATE,PRODUCT_GROUP_ID&lt;BR /&gt;PM1,1/1/2018,12/31/2018, 100&lt;BR /&gt;PM1,1/1/2019,1/1/2099,101&lt;BR /&gt;PM2,1/1/2019,1/1/2099,102&lt;BR /&gt;];&lt;BR /&gt;Result:&lt;BR /&gt;Noconcatenate&lt;BR /&gt;load * resident FCT_TRANSACTION&lt;BR /&gt;Where Date(TRANSACTION_DT)&amp;gt;=Date(FROM_DATE) and Date(TRANSACTION_DT)&amp;lt;=Date(TO_DATE);&lt;BR /&gt;drop table FCT_TRANSACTION;&lt;/P&gt;&lt;P&gt;exit script;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 15:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682699#M51968</guid>
      <dc:creator>DebP</dc:creator>
      <dc:date>2020-03-08T15:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Left join using between</title>
      <link>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682799#M51981</link>
      <description>&lt;P&gt;I didn't quite get it, bu maye be :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FCT_TRANSACTION:
LOAD * Inline [
TRANSACTION_NO, CONTRACT_CD, TRANSACTION_DT
10000,PM1,12/10/2018
20000,PM1,12/10/2019
30000,PM7,12/10/2019
];
left join
PRODUCT_GROUP:
LOAD * Inline [
CONTRACT_CD, FROM_DATE, TO_DATE,PRODUCT_GROUP_ID
PM1,1/1/2018,12/31/2018, 100
PM1,1/1/2019,1/1/2099,101
PM2,1/1/2019,1/1/2099,102
];
Result:
Noconcatenate
load * resident FCT_TRANSACTION
Where (Date(TRANSACTION_DT)&amp;gt;=Date(FROM_DATE) and Date(TRANSACTION_DT)&amp;lt;=Date(TO_DATE)) or (not isnull(CONTRACT_CD) and (isnull(TO_DATE) and isnull(FROM_DATE)));
drop table FCT_TRANSACTION;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 781px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29742iB5FFFC26913AFB42/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 09:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-join-using-between/m-p/1682799#M51981</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-03-09T09:32:42Z</dc:date>
    </item>
  </channel>
</rss>

