<?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 Troubleshooting MS SQL Server: ERROR [22007] Conversion failed in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Troubleshooting-MS-SQL-Server-ERROR-22007-Conversion-failed/m-p/2123370#M12858</link>
    <description>&lt;P&gt;Hello together. When I try to preview/import a view (table) from MS SQL server I get the message:&lt;/P&gt;
&lt;P&gt;Microsoft SQL Server - Connector:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ERROR [22007] Conversion failed when converting date and/or time from character string.,&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;If I load the same view from Google BigQuery (import from MS SQL) or by using the ODBC connector instead of the Qlik Microsoft SQL Server connector it's&amp;nbsp; working correctly.&lt;BR /&gt;When I load not the view but rather the source table from SQL server its also working without any errors.&lt;/P&gt;
&lt;P&gt;I can't see any differences between the definitions of date/time fields&amp;nbsp;in the table and the view. So which options do I have to investigate/understand this behavior?&lt;BR /&gt;&lt;BR /&gt;In history loading from Microsoft SQL Server connector was quiet faster than through ODBC connector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 10:00:44 GMT</pubDate>
    <dc:creator>fe-c</dc:creator>
    <dc:date>2023-09-28T10:00:44Z</dc:date>
    <item>
      <title>Troubleshooting MS SQL Server: ERROR [22007] Conversion failed</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Troubleshooting-MS-SQL-Server-ERROR-22007-Conversion-failed/m-p/2123370#M12858</link>
      <description>&lt;P&gt;Hello together. When I try to preview/import a view (table) from MS SQL server I get the message:&lt;/P&gt;
&lt;P&gt;Microsoft SQL Server - Connector:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ERROR [22007] Conversion failed when converting date and/or time from character string.,&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;If I load the same view from Google BigQuery (import from MS SQL) or by using the ODBC connector instead of the Qlik Microsoft SQL Server connector it's&amp;nbsp; working correctly.&lt;BR /&gt;When I load not the view but rather the source table from SQL server its also working without any errors.&lt;/P&gt;
&lt;P&gt;I can't see any differences between the definitions of date/time fields&amp;nbsp;in the table and the view. So which options do I have to investigate/understand this behavior?&lt;BR /&gt;&lt;BR /&gt;In history loading from Microsoft SQL Server connector was quiet faster than through ODBC connector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 10:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Troubleshooting-MS-SQL-Server-ERROR-22007-Conversion-failed/m-p/2123370#M12858</guid>
      <dc:creator>fe-c</dc:creator>
      <dc:date>2023-09-28T10:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting MS SQL Server: ERROR [22007] Conversion failed</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Troubleshooting-MS-SQL-Server-ERROR-22007-Conversion-failed/m-p/2491389#M14294</link>
      <description>&lt;P&gt;&lt;SPAN class="--l sentence_highlight"&gt;We have now found a solution.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="--l --r sentence_highlight"&gt;The cause was a function that was integrated in the SQL table to be called. &lt;/SPAN&gt;&lt;SPAN class="--l sentence_highlight"&gt;This contained a 'datediff()' call which could not be evaluated by the Qlik MS SQL connector.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="--l sentence_highlight"&gt;DATEDIFF ( datepart , startdate , enddate )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="--l sentence_highlight"&gt;The solution was to replace this function with a floating point calculation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="--l --r sentence_highlight"&gt;However, since the old function (incl. 'datediff()') worked with the Qlik ODBC connector (on premise), I guess there might be a bug in the Qlik MS SQL connector (on premise &amp;amp; saas).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 13:06:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Troubleshooting-MS-SQL-Server-ERROR-22007-Conversion-failed/m-p/2491389#M14294</guid>
      <dc:creator>fe-c</dc:creator>
      <dc:date>2024-11-07T13:06:03Z</dc:date>
    </item>
  </channel>
</rss>

