<?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 matching criteria (date interval) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174184#M629042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Settu, thanks for your help. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Understood your point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;My intention is to refer APONTAMENTOS.DATA_HORA_INI. Considering APONTAMENTOS was previously loaded (before join command), how can I do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;On SQL command, this line would be something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14724703132289317 jive_text_macro" jivemacro_uid="_14724703132289317" modifiedtitle="true"&gt;
&lt;P&gt;ON APONTAMENTOS.DATA_HORA_INI &amp;lt;= PARADA.DATA_HORA_INI_Parada AND APONTAMENTOS.DATA_HORA_FIM &amp;gt;= PARADA.DATA_HORA_FIM_Parada&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Henrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Aug 2016 11:33:46 GMT</pubDate>
    <dc:creator>h_demarco</dc:creator>
    <dc:date>2016-08-29T11:33:46Z</dc:date>
    <item>
      <title>Left join matching criteria (date interval)</title>
      <link>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174182#M629040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear gurus,&lt;/P&gt;&lt;P&gt;I am trying to left join 2 tables in order &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;to add a column [Duração_parada] for each row in [Apontamentos], only when &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;DATA_HORA_INI&amp;lt;=DATA_HORA_INI_Parada AND DATA_HORA_FIM_Parada &amp;lt;=DATA_HORA_FIM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; font-family: arial, helvetica, sans-serif;"&gt;First of all, I load a table with PARADA data:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1472135664297739 jive_text_macro" jivemacro_uid="_1472135664297739"&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;
&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Parada:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;LOAD 'Parada' As Tipo_ap,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; DATA_HORA_INI As DATA_HORA_INI_Parada,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA_HORA_FIM As DATA_HORA_FIM_Parada,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num((DATA_HORA_FIM+Time('00:01:00')-DATA_HORA_INI)*24,'#######') As Duração_parada&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;FROM QVDs\VIEW_PCPAPPARADA.qvd (qvd); &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; Then it loads Apontamentos:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14721357794674607 jive_text_macro" jivemacro_uid="_14721357794674607"&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;
&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Apontamentos:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;LOAD 'Produção' As Tipo_ap,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECURSO,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA_HORA_INI,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA_HORA_FIM,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num((DATA_HORA_FIM+Time('00:01:00')-DATA_HORA_INI)*24,'#######') As Duração,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;FROM QVDs\VIEW_PCPAPPRODUCAO.qvd (qvd);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;And then it tries to join:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14721358205959924" jivemacro_uid="_14721358205959924"&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;
&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;LEFT JOIN (Apontamentos)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;LOAD Sum(Duração_parada)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Resident Parada&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Where DATA_HORA_INI&amp;lt;=DATA_HORA_INI_Parada AND DATA_HORA_FIM_Parada &amp;lt;=DATA_HORA_FIM; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;But it returns error:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1472135847381610" jivemacro_uid="_1472135847381610"&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;
&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Field not found - &amp;lt;DATA_HORA_INI&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;LEFT JOIN&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;LOAD Sum(Duração_parada)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Resident Parada&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Where DATA_HORA_INI&amp;lt;=DATA_HORA_INI_Parada AND DATA_HORA_FIM_Parada &amp;lt;=DATA_HORA_FIM&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;Any idea on how to achieve objective or handle error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 14:37:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174182#M629040</guid>
      <dc:creator>h_demarco</dc:creator>
      <dc:date>2016-08-25T14:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Left join matching criteria (date interval)</title>
      <link>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174183#M629041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You have already aliased the field &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;DATA_HORA_INI as &lt;STRONG&gt;DATA_HORA_INI_Parada,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;So, if you are using resident load of Parada, the field wont be found&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135730_Capture.JPG" style="height: 402px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 15:23:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174183#M629041</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-08-26T15:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Left join matching criteria (date interval)</title>
      <link>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174184#M629042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Settu, thanks for your help. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Understood your point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;My intention is to refer APONTAMENTOS.DATA_HORA_INI. Considering APONTAMENTOS was previously loaded (before join command), how can I do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;On SQL command, this line would be something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14724703132289317 jive_text_macro" jivemacro_uid="_14724703132289317" modifiedtitle="true"&gt;
&lt;P&gt;ON APONTAMENTOS.DATA_HORA_INI &amp;lt;= PARADA.DATA_HORA_INI_Parada AND APONTAMENTOS.DATA_HORA_FIM &amp;gt;= PARADA.DATA_HORA_FIM_Parada&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Henrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 11:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174184#M629042</guid>
      <dc:creator>h_demarco</dc:creator>
      <dc:date>2016-08-29T11:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Left join matching criteria (date interval)</title>
      <link>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174185#M629043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This error was solved using SQL. So Qlikview got fields ready from server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 11:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-join-matching-criteria-date-interval/m-p/1174185#M629043</guid>
      <dc:creator>h_demarco</dc:creator>
      <dc:date>2016-10-14T11:19:19Z</dc:date>
    </item>
  </channel>
</rss>

