<?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: Null values when reading DateTime2 Field in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305080#M76782</link>
    <description>You might using Microsoft driver. With jtds you might get Not null</description>
    <pubDate>Thu, 29 Jun 2017 19:03:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-29T19:03:40Z</dc:date>
    <item>
      <title>Null values when reading DateTime2 Field</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305079#M76781</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;When reading datetime2 fields with tMSSqlInput, all the date values come as null.&lt;/P&gt;
&lt;P&gt;I even specify the date pattern "yyyy-MM-dd HH:mm:ss.SSS" in the schema definition, but to no avail.&lt;/P&gt;
&lt;P&gt;I have also tried the tMSSqlRow component and it produces the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate your help in fixing this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 18:20:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305079#M76781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-29T18:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Null values when reading DateTime2 Field</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305080#M76782</link>
      <description>You might using Microsoft driver. With jtds you might get Not null</description>
      <pubDate>Thu, 29 Jun 2017 19:03:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305080#M76782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-29T19:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Null values when reading DateTime2 Field</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305081#M76783</link>
      <description>&lt;P&gt;Yes i'm using the Microsoft jdbc driver as required per the MSSqlInput component. There is data in the table that I'm querying, but it simply comes as null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another odd, perhaps unrelated, behaviour, is that when I press guess schema based on the query, Talend produces the following error "class not found net.sourceforge.jtds.jdbc.driver". Is there something wrong with the installation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Using a jtds jdbc connection to the MsSqlServer fixes the datetime related issue.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 10:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305081#M76783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-30T10:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Null values when reading DateTime2 Field</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305082#M76784</link>
      <description>&lt;P&gt;Changing JDBC provider from Microsoft to open source JTDS as suggested by&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00570000004X0qqAAC"&gt;@rchinta&lt;/A&gt; was fix for the titled issue, few days back, when I was running the jobs in development environment.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now, I m running the same jobs on staging environment which giving an error related to connection :&lt;U&gt; "Invalid state : Connection object is closed"&lt;/U&gt;. Further, I tried changing JDBC provider to Microsoft, the issue of connection has resolved. But again the null date issue has raised with JDBC provider as Microsoft.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;UPDATE :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;In my case Microsoft JDBC retuning Null for Date field, but its perfect with DateTime field.&lt;/P&gt; 
&lt;P&gt;So, I just changed tMSSqlInput component query for Date field as :&lt;/P&gt; 
&lt;PRE&gt;SELECT CAST(Date_Field as Datetime)&amp;nbsp;from Table_Name&lt;/PRE&gt; 
&lt;P&gt;instead of :&lt;/P&gt; 
&lt;PRE&gt;SELECT Date_Field from Table_Name&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I don't know if this is efficient solution or not, but if the issue is driver related then one can go for the above solution.&lt;/P&gt; 
&lt;P&gt;Hope this would help someone facing the same issue with mssql-jdbc.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 13:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-values-when-reading-DateTime2-Field/m-p/2305082#M76784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T13:29:21Z</dc:date>
    </item>
  </channel>
</rss>

