<?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 Intervalmatch with overlapping date ranges in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Intervalmatch-with-overlapping-date-ranges/m-p/198416#M57722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally got the right combination of syntax and it worked,&lt;/P&gt;&lt;P&gt;This worked,&lt;/P&gt;&lt;P&gt;periods_tmp:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, DEnd, DStart&lt;BR /&gt; 2009-08, 9/1/2009, 5/1/2009&lt;BR /&gt; 2009-07, 8/1/2009, 4/1/2009&lt;BR /&gt; 2009-06, 7/1/2009, 3/1/2009&lt;BR /&gt; 2009-05, 6/1/2009, 2/1/2009&lt;BR /&gt; 2009-04, 5/1/2009, 1/1/2009&lt;BR /&gt; 2009-03, 4/1/2009, 12/1/2008&lt;BR /&gt; 2009-02, 3/1/2009, 11/1/2008&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;//Convert strings to Dates&lt;BR /&gt;periods:&lt;BR /&gt;Load Period, Date#(DStart) as PStart, Date#(DEnd) as PEnd&lt;BR /&gt;Resident periods_tmp;&lt;/P&gt;&lt;P&gt;//Drop Temp Table&lt;BR /&gt;drop table periods_tmp;&lt;/P&gt;&lt;P&gt;//Load History and Strip TimeStamp&lt;/P&gt;&lt;P&gt;history:&lt;BR /&gt;Load Floor(Createdate) as Createdate, HistoryID;&lt;BR /&gt;SQL select Createdate, HistoryID&lt;BR /&gt;from History&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;// This Generates a syn$ Table on Start/End - but does the binding.&lt;BR /&gt;LEFT JOIN (history)&lt;BR /&gt;Intervalmatch (Createdate)&lt;BR /&gt;Load PStart, PEnd Resident periods;&lt;/P&gt;&lt;P&gt;// NEED TO DROP SYN$ TABLE !!! - So ...&lt;BR /&gt;// Add Period to Table based on PStart/PEnd&lt;BR /&gt;LEFT JOIN (history)&lt;BR /&gt;LOAD&lt;BR /&gt; PStart&lt;BR /&gt;,PEnd&lt;BR /&gt;,Period&lt;BR /&gt;RESIDENT periods;&lt;/P&gt;&lt;P&gt;// Dropping Perios Drops the Syn$ Table too&lt;BR /&gt;DROP TABLE periods;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2009 20:42:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-25T20:42:58Z</dc:date>
    <item>
      <title>Intervalmatch with overlapping date ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Intervalmatch-with-overlapping-date-ranges/m-p/198415#M57721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps i am approaching this wrong, but my class documentation (7.0) implied this works with overlapping data and all the samples appears to fail in this case. My sample code is;&lt;/P&gt;&lt;P&gt;periods_tmp:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, DStart, DEnd&lt;BR /&gt; 2009-08, 9/1/2009, 5/1/2009&lt;BR /&gt; 2009-07, 8/1/2009, 4/1/2009&lt;BR /&gt; 2009-06, 7/1/2009, 3/1/2009&lt;BR /&gt; 2009-05, 6/1/2009, 2/1/2009&lt;BR /&gt; 2009-04, 5/1/2009, 1/1/2009&lt;BR /&gt; 2009-03, 4/1/2009, 12/1/2008&lt;BR /&gt; 2009-02, 3/1/2009, 11/1/2008&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;periods:&lt;BR /&gt;Load Period, Date#(DStart) as PStart, Date#(DEnd) as PEnd&lt;BR /&gt;Resident periods_tmp;&lt;/P&gt;&lt;P&gt;drop table periods_tmp;&lt;/P&gt;&lt;P&gt;history:&lt;BR /&gt;Load *;&lt;BR /&gt;SQL select * from History where createdate &amp;gt; getdate()-100;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LEFT JOIN (history)&lt;BR /&gt;Intervalmatch (CREATEDATE)&lt;BR /&gt;Load PStart, PEnd Resident [periods];&lt;/P&gt;&lt;P&gt;This fails to get me wahat I want and i don't think its a syntax issue. Any suggestions would help here. i can load the history table with a lot of booleans tied to the periods, make a intermidiate table of periods to history dates and repetitively load it or is there another method I'm missing with the Inertvalmatch&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;periods_tmp:&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD * INLINE [&lt;BR /&gt; Period, DStart, DEnd&lt;BR /&gt; 2009-08, 9/1/2009, 5/1/2009&lt;BR /&gt; 2009-07, 8/1/2009, 4/1/2009&lt;BR /&gt; 2009-06, 7/1/2009, 3/1/2009&lt;BR /&gt; 2009-05, 6/1/2009, 2/1/2009&lt;BR /&gt; 2009-04, 5/1/2009, 1/1/2009&lt;BR /&gt; 2009-03, 4/1/2009, 12/1/2008&lt;BR /&gt; 2009-02, 3/1/2009, 11/1/2008&lt;BR /&gt;];&lt;BR /&gt;periods:&lt;BR /&gt;Load Period, Date#(DStart) as PStart, Date#(DEnd) as PEnd&lt;BR /&gt;Resident periods_tmp;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;drop table periods_tmp;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;history:&lt;BR /&gt;Load *;&lt;BR /&gt;SQL select * from History where createdate &amp;gt; getdate()-100;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;BR /&gt;LEFT JOIN (history)&lt;BR /&gt; Intervalmatch (CREATEDATE)&lt;BR /&gt; Select PStart, PEnd Resident periods;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 04:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intervalmatch-with-overlapping-date-ranges/m-p/198415#M57721</guid>
      <dc:creator />
      <dc:date>2009-09-25T04:27:14Z</dc:date>
    </item>
    <item>
      <title>Intervalmatch with overlapping date ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Intervalmatch-with-overlapping-date-ranges/m-p/198416#M57722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally got the right combination of syntax and it worked,&lt;/P&gt;&lt;P&gt;This worked,&lt;/P&gt;&lt;P&gt;periods_tmp:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Period, DEnd, DStart&lt;BR /&gt; 2009-08, 9/1/2009, 5/1/2009&lt;BR /&gt; 2009-07, 8/1/2009, 4/1/2009&lt;BR /&gt; 2009-06, 7/1/2009, 3/1/2009&lt;BR /&gt; 2009-05, 6/1/2009, 2/1/2009&lt;BR /&gt; 2009-04, 5/1/2009, 1/1/2009&lt;BR /&gt; 2009-03, 4/1/2009, 12/1/2008&lt;BR /&gt; 2009-02, 3/1/2009, 11/1/2008&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;//Convert strings to Dates&lt;BR /&gt;periods:&lt;BR /&gt;Load Period, Date#(DStart) as PStart, Date#(DEnd) as PEnd&lt;BR /&gt;Resident periods_tmp;&lt;/P&gt;&lt;P&gt;//Drop Temp Table&lt;BR /&gt;drop table periods_tmp;&lt;/P&gt;&lt;P&gt;//Load History and Strip TimeStamp&lt;/P&gt;&lt;P&gt;history:&lt;BR /&gt;Load Floor(Createdate) as Createdate, HistoryID;&lt;BR /&gt;SQL select Createdate, HistoryID&lt;BR /&gt;from History&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;// This Generates a syn$ Table on Start/End - but does the binding.&lt;BR /&gt;LEFT JOIN (history)&lt;BR /&gt;Intervalmatch (Createdate)&lt;BR /&gt;Load PStart, PEnd Resident periods;&lt;/P&gt;&lt;P&gt;// NEED TO DROP SYN$ TABLE !!! - So ...&lt;BR /&gt;// Add Period to Table based on PStart/PEnd&lt;BR /&gt;LEFT JOIN (history)&lt;BR /&gt;LOAD&lt;BR /&gt; PStart&lt;BR /&gt;,PEnd&lt;BR /&gt;,Period&lt;BR /&gt;RESIDENT periods;&lt;/P&gt;&lt;P&gt;// Dropping Perios Drops the Syn$ Table too&lt;BR /&gt;DROP TABLE periods;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 20:42:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intervalmatch-with-overlapping-date-ranges/m-p/198416#M57722</guid>
      <dc:creator />
      <dc:date>2009-09-25T20:42:58Z</dc:date>
    </item>
  </channel>
</rss>

