<?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>Question Re: Convert column error (via ODBC) in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063075#M3625995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as i know does JDBC reads the (user)datatypes for the Database ( there has been an Issue some years ago with logging into one db and reading from a table located in another DB with Userdatatypes*, thats why i remember this)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the jdbc(driver) can then deliver the apropriate type/ cast and its working &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* they had to have the same id´s in all databases used in the connection&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Mar 2014 14:13:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-03-03T14:13:09Z</dc:date>
    <item>
      <title>Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaq-p/10063069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Monospaced;"&gt;Hi, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Monospaced;"&gt;While trying to import data from ASE via a remote server, I’m getting the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: red; font-size: 9.0pt; font-family: Monospaced;"&gt;SQL Anywhere Error -1000187: Unable to implicitly convert column 'varDate' to datatype (datetime) from datatype (integer). &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: red; font-size: 9.0pt; font-family: Monospaced;"&gt;-- (dflib/df_Heap.cxx 13287) _&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Monospaced;"&gt;Have any one had this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Monospaced;"&gt;How do you solve it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Monospaced;"&gt;Thanks a lot,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: Monospaced;"&gt;Here are the steps to reproduce the error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;create server &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;ohdwetldev01&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;class &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: red;"&gt;'aseodbc'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;using &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: red;"&gt;'driver=/IQ/Server/IQ-16/ODBC/DataAccess64/ODBC/lib/libsybdrvodb.so;dsn=ohdwetldev01'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;select &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;* &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;from &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;sysserver&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;srvid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; srvname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; srvclass&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; srvinfo srvreadonly&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; -------- ------------&amp;nbsp; ----------- -----------------------------------------------------------------------------------&amp;nbsp; -------------- &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; 1 ohdwetldev01&amp;nbsp; aseodbc driver=/IQ/Server/IQ-16/ODBC/DataAccess64/ODBC/lib/libsybdrvodb.so;dsn=ohdwetldev01&amp;nbsp; N &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;create table DBA&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;.uver_DateTest&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; (varID &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: #8000ff;"&gt;integer &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: blue;"&gt;null&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;&amp;nbsp; varDate &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: #8000ff;"&gt;datetime &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: blue;"&gt;null&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;forward to &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;ohdwetldev01 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;select &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: fuchsia;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;, null}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;expr_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr_2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; --------- --------- &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; 1 (null)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; 1 record(s) selected [Fetch MetaData: 0ms] [Fetch Data: 0ms] &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt; [Executed: 26/02/2014 10:16:49 AM] [Execution: 6ms] &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;insert into DBA&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;.uver_DateTest location &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: red;"&gt;'ohdwetldev01.testStageDb'&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: Monospaced;"&gt;select &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: fuchsia;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: Monospaced; color: black;"&gt;, null}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: red; font-size: 9.0pt; font-family: Monospaced;"&gt;SQL Anywhere Error -1000187: Unable to implicitly convert column 'varDate' to datatype (datetime) from datatype (integer). &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: red; font-size: 9.0pt; font-family: Monospaced;"&gt;-- (dflib/df_Heap.cxx 13287) _&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 15:31:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaq-p/10063069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-26T15:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063070#M3625990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try forcing the data type on the remote system.&amp;nbsp; Right now it is an int and null. But the null isn't bound to a data type so we default to an int.&amp;nbsp; Consider using the convert statement to convert null to a datetime data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MArk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 16:03:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063070#M3625990</guid>
      <dc:creator>markmumy</dc:creator>
      <dc:date>2014-02-26T16:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063071#M3625991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;what happens if you not insert a NULL value but a concrete date ?&lt;/P&gt;&lt;P&gt;if this works then you could change your query to :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Monospaced; color: blue; font-size: 9pt;"&gt;insert into DBA&lt;/STRONG&gt;&lt;SPAN style="font-family: Monospaced; color: black; font-size: 9pt;"&gt;.uver_DateTest location &lt;/SPAN&gt;&lt;SPAN style="font-family: Monospaced; color: red; font-size: 9pt;"&gt;'ohdwetldev01.testStageDb'&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Monospaced; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;STRONG style="font-family: Monospaced; color: blue; font-size: 9pt;"&gt;select &lt;/STRONG&gt;&lt;SPAN style="font-family: Monospaced; color: fuchsia; font-size: 9pt;"&gt;myID&lt;/SPAN&gt;&lt;SPAN style="font-family: Monospaced; color: black; font-size: 9pt;"&gt;, isnull(myDate,'01.01.1900' from mySource}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Monospaced; color: black; font-size: 9pt;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Monospaced; color: black; font-size: 9pt;"&gt;dj&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 16:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063071#M3625991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-26T16:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063072#M3625992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is nothing in the {select 1, null} whether run on IQ or in ASE that indicates the datatype of the 'null'.&amp;nbsp; By default it will be defined as an integer.&amp;nbsp; Even when you forward to ASE, the result that came back was proabably an int, not a datetime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to cast the null as datetime in your select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 16:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063072#M3625992</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2014-02-26T16:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063073#M3625993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, if I convert to datetime at the source it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert into DBA.uver_DateTest location 'ohdwetldev01.testStageDb' &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {select 1, cast(null as datetime)}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, the fist syntax works in SAP IQ 15.2 ESD #2 using JDBC for the remote server, no need to cast or convert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a change of behavior due to SAP IQ 16.0 SP3 or to the use of ODBC instead of JDBC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 16:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063073#M3625993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-26T16:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063074#M3625994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; Likely the issue is what the protocol/driver does to null values that come across from ASE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2014 20:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063074#M3625994</guid>
      <dc:creator>markmumy</dc:creator>
      <dc:date>2014-03-02T20:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column error (via ODBC)</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063075#M3625995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as i know does JDBC reads the (user)datatypes for the Database ( there has been an Issue some years ago with logging into one db and reading from a table located in another DB with Userdatatypes*, thats why i remember this)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the jdbc(driver) can then deliver the apropriate type/ cast and its working &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* they had to have the same id´s in all databases used in the connection&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 14:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-column-error-via-odbc/qaa-p/10063075#M3625995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-03T14:13:09Z</dc:date>
    </item>
  </channel>
</rss>

