<?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 Comparing Dates between 2 Tables giving unexpected Results in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Comparing-Dates-between-2-Tables-giving-unexpected-Results/m-p/2310779#M81877</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having an instance where 2 tables are involved for Querying and where clause is mainly based on dates and the resulting output is in Aggregation (the count)&lt;/P&gt;&lt;P&gt;Note: 2 Tables have different primary Keys, but there is a common key which joins both of them, and the SQL is running perfectly fine, but the Talend job unable to&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;SQL&lt;/P&gt;&lt;P&gt;SELECT COUNT(*), PT.PT_ID, ST.DAY_OF_REC FROM PRIMARY_TABLE PT INNER JOIN SECONDARY_TABLE ST ON PT.PT_ID=ST.PT_ID&lt;/P&gt;&lt;P&gt;WHERE ST.END_DATE_TIME &amp;gt;= PT.COMPLETED_DTM AND ST.START_DATE_TIME &amp;lt; PT.COMPLETED_DTM GROUP BY PT.PT_ID, ST.DAY_OF_REC ORDER BY 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Talend&lt;/P&gt;&lt;P&gt;Primary Table --&amp;gt; ST (row15)&lt;/P&gt;&lt;P&gt;Lookup Table --&amp;gt; PT (row16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMAP expression filter&lt;/P&gt;&lt;P&gt;row16.COMPLETED_DTM != null&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;row16.COMPLETED_DTM.before(row15.END_DATE_TIME)&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;row16.COMPLETED_DTM.after(row15.START_DATE_TIME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in Output, i'm only taking PT_ID &amp;amp; DAY_OF_REC columns, and finally after Tmap is executed, i see only one rec, as output.&lt;/P&gt;&lt;P&gt;If i include row16.COMPLETED_DTM or row15.END_DATE_TIME or row15.START_DATE_TIME in the out, then seeing all the records from PT table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: i'm new to talend, but not to Java&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:46:26 GMT</pubDate>
    <dc:creator>MM1655984008</dc:creator>
    <dc:date>2024-11-15T22:46:26Z</dc:date>
    <item>
      <title>Comparing Dates between 2 Tables giving unexpected Results</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Comparing-Dates-between-2-Tables-giving-unexpected-Results/m-p/2310779#M81877</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having an instance where 2 tables are involved for Querying and where clause is mainly based on dates and the resulting output is in Aggregation (the count)&lt;/P&gt;&lt;P&gt;Note: 2 Tables have different primary Keys, but there is a common key which joins both of them, and the SQL is running perfectly fine, but the Talend job unable to&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;SQL&lt;/P&gt;&lt;P&gt;SELECT COUNT(*), PT.PT_ID, ST.DAY_OF_REC FROM PRIMARY_TABLE PT INNER JOIN SECONDARY_TABLE ST ON PT.PT_ID=ST.PT_ID&lt;/P&gt;&lt;P&gt;WHERE ST.END_DATE_TIME &amp;gt;= PT.COMPLETED_DTM AND ST.START_DATE_TIME &amp;lt; PT.COMPLETED_DTM GROUP BY PT.PT_ID, ST.DAY_OF_REC ORDER BY 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Talend&lt;/P&gt;&lt;P&gt;Primary Table --&amp;gt; ST (row15)&lt;/P&gt;&lt;P&gt;Lookup Table --&amp;gt; PT (row16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMAP expression filter&lt;/P&gt;&lt;P&gt;row16.COMPLETED_DTM != null&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;row16.COMPLETED_DTM.before(row15.END_DATE_TIME)&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;row16.COMPLETED_DTM.after(row15.START_DATE_TIME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in Output, i'm only taking PT_ID &amp;amp; DAY_OF_REC columns, and finally after Tmap is executed, i see only one rec, as output.&lt;/P&gt;&lt;P&gt;If i include row16.COMPLETED_DTM or row15.END_DATE_TIME or row15.START_DATE_TIME in the out, then seeing all the records from PT table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: i'm new to talend, but not to Java&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Comparing-Dates-between-2-Tables-giving-unexpected-Results/m-p/2310779#M81877</guid>
      <dc:creator>MM1655984008</dc:creator>
      <dc:date>2024-11-15T22:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Dates between 2 Tables giving unexpected Results</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Comparing-Dates-between-2-Tables-giving-unexpected-Results/m-p/2310780#M81878</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;Please upload a screenshot of tMap, it will be helpful for us to understand what you do on tMap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 09:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Comparing-Dates-between-2-Tables-giving-unexpected-Results/m-p/2310780#M81878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-02T09:12:57Z</dc:date>
    </item>
  </channel>
</rss>

