<?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: [resolved] SQL query returning different results within talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365872#M129432</link>
    <description>Hello 
&lt;BR /&gt;It's weird, anyway it should display '00' at the end of date, Can you upload some screenshots of job?
&lt;BR /&gt;I try to reproduce the problem.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
    <pubDate>Thu, 29 Apr 2010 04:23:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-04-29T04:23:21Z</dc:date>
    <item>
      <title>[resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365869#M129429</link>
      <description>Hi, I have a tMysqlInput component that runs this query : 
&lt;BR /&gt;SELECT IF (LENGTH(MONTH(a.currentDate)) = 2,CONCAT(YEAR(a.currentDate), "-", 
&lt;BR /&gt; MONTH(a.currentDate), "-00"), CONCAT(YEAR(a.currentDate), "-0", MONTH(a.currentDate), 
&lt;BR /&gt; "-00")) AS currentMonth, SUM(dataCount) AS dataCount 
&lt;BR /&gt;FROM dw_stats_newAnnonceCount_daily a 
&lt;BR /&gt;WHERE MONTH(a.currentDate) = MONTH(CURDATE()) 
&lt;BR /&gt;GROUP BY MONTH(a.currentDate) 
&lt;BR /&gt; 
&lt;BR /&gt;When executed directly on the server, it gives me the appropriate results : 
&lt;BR /&gt;currentMonth dataCount 
&lt;BR /&gt;2010-04-00 171416 
&lt;BR /&gt; 
&lt;BR /&gt;When executed withing the component, it gives me weird stuff : 
&lt;BR /&gt;2010-03-31|171416 
&lt;BR /&gt;The data count is accurate but for some reasons, my date workaround doesn't work well with talend. 
&lt;BR /&gt;Maybe a bug but not sure. 
&lt;BR /&gt;Any idea anyone?</description>
      <pubDate>Sat, 16 Nov 2024 13:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365869#M129429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365870#M129430</link>
      <description>&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;</description>
      <pubDate>Wed, 28 Apr 2010 19:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365870#M129430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-28T19:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365871#M129431</link>
      <description>Some update : 
&lt;BR /&gt;Actually, my query is in the repository and when I run it from there, it gives me the correct result too.
&lt;BR /&gt;Really seems to be some strange bug from what I can judge.</description>
      <pubDate>Wed, 28 Apr 2010 19:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365871#M129431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-28T19:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365872#M129432</link>
      <description>Hello 
&lt;BR /&gt;It's weird, anyway it should display '00' at the end of date, Can you upload some screenshots of job?
&lt;BR /&gt;I try to reproduce the problem.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 29 Apr 2010 04:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365872#M129432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-29T04:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365873#M129433</link>
      <description>hi Shong, please see the attached screenshots.
&lt;BR /&gt;Thanks,</description>
      <pubDate>Thu, 29 Apr 2010 13:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365873#M129433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-29T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365874#M129434</link>
      <description>Some update : 
&lt;BR /&gt;While waiting, I tried to create another query leading to the same results and I came up with this : 
&lt;BR /&gt;SELECT CAST(CONCAT(SUBSTR(a.currentDate, 1, 8), '00') AS DATE) AS currentMonth, SUM(dataCount) AS dataCount 
&lt;BR /&gt;FROM dw_stats_newAnnonceCount_daily a 
&lt;BR /&gt;WHERE MONTH(a.currentDate) = MONTH(CURDATE()) 
&lt;BR /&gt;GROUP BY MONTH(a.currentDate) 
&lt;BR /&gt;Again, once executed on the server itself, it gives the correct result : 2010-04-00 
&lt;BR /&gt;And again once executed within the talend component, it returns 2010-03-31 
&lt;BR /&gt;Another info is that now, even when executed from within the repository, it gives the wrong result while the first query was returning the good one. 
&lt;BR /&gt;Please note that with this query, if I change '00' for '01', it seems to work, returning 2010-04-01 so it seems that there is something in java that mabye stops you from have a date like xxxx-yy-00 
&lt;BR /&gt;Anybody can confirm this information? 
&lt;BR /&gt;As for the first request, even If I change '00' for '01', I still get the weird result.</description>
      <pubDate>Fri, 30 Apr 2010 14:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365874#M129434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-30T14:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365875#M129435</link>
      <description>If you return this value as a Date (Java Type) the day 00 don't exist and Java create a Date itself (close from the result) to don't return a DataFormatException.&lt;BR /&gt;If you return this valus as a String, I guess you'll have the expected result because Java will not try to return a Valid data and the String would be : 2010-04-00.&lt;BR /&gt;Feel free to turn the Schema definition to String for this FIELD in your tDBInput component.&lt;BR /&gt;Best regards,</description>
      <pubDate>Fri, 30 Apr 2010 14:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365875#M129435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-30T14:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365876#M129436</link>
      <description>Ok.  I guess the whole problem since the beginning is that SQL let you have a date like 2010-04-00 but Java doesnt.  I guess I'll try to play with data types so date are considered as string.</description>
      <pubDate>Fri, 30 Apr 2010 15:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365876#M129436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-30T15:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365877#M129437</link>
      <description>Correct. Your SQL expression return your expecting value without any validation. 
&lt;BR /&gt;In Java the data type like Data, Float or others will return only a Date or Float data in those fields otherwise it will return a Exception DateFormatException, NumberFormatException etc.... 
&lt;BR /&gt;If you change in your input component to String, Java will build your SQL return conform to your result without any interpretation. 
&lt;BR /&gt;Best regards;</description>
      <pubDate>Fri, 30 Apr 2010 15:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365877#M129437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-30T15:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365878#M129438</link>
      <description>Problem solved! Now getting what I was expecting to.
&lt;BR /&gt;Thank you cantoine.</description>
      <pubDate>Fri, 30 Apr 2010 15:07:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365878#M129438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-30T15:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SQL query returning different results within talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365879#M129439</link>
      <description>You're welcome.&lt;BR /&gt;Have fun with our solution.</description>
      <pubDate>Fri, 30 Apr 2010 15:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SQL-query-returning-different-results-within-talend/m-p/2365879#M129439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-30T15:13:23Z</dc:date>
    </item>
  </channel>
</rss>

