<?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: Problem with NULL values using Sybase ODBC driver in Linux in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586224#M4322266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry.&amp;nbsp; It was not stated that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would to 2 things -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First - ensure that you have applied the SPs that come with the ODBC driver to the ASE 15.7.&amp;nbsp; They are usually located in a folder under the driver installation and contain scripts that install/patch the metadata for the driver on the ASE side.&amp;nbsp; Just quickly looking at my Windows installation, there is an '$SYBASE/DataAccess64/ODBC/sp/install_odbc_sprocs.bat' script that will determine which actual SQL script to install on an ASE for my 16.0 ODBC drivers.&amp;nbsp; In my case, there is an sp_drv_common_1570020.sql script that would install on an ASE 15.7 server, as opposed to the sp_drv_common_1600000.sql script that would install on an ASE 16.0.&amp;nbsp; You can also just install these scripts via the SDK isql tool as 'sa' as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is required when you upgrade or patch drivers (ODBC, JDBC, etc.) on the client side.&amp;nbsp; Installmaster will install the most recent versions of the drivers (see 'sp_version' output) at that ASE/SDK release version, when you upgrade ASE, but as you are using 16.0 against 15.7, you probably need to install the newer metadata to match your highest level ODBC driver.&amp;nbsp; Drivers are actually in 2 parts (client-side and server-side) to keep them thinner on the client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doesn't solve your issue, try installing the latest SP of the driver with the server-side pieces updated as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second - if nothing works, please log an incident with SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2016 16:22:08 GMT</pubDate>
    <dc:creator>ChrisBaker</dc:creator>
    <dc:date>2016-03-11T16:22:08Z</dc:date>
    <item>
      <title>Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaq-p/11586221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am accessing a Sybase ASE 15.7 database using Sybase ASE 16.0 ODBC driver on Ubuntu 14.04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a strange problem with fetching NULL values. At first I noticed the problem with a Python script,&lt;/P&gt;&lt;P&gt;but the problem remains the same when using the isql command line tool that comes with unixodbc&lt;/P&gt;&lt;P&gt;package. The isql command line tool can be used to access the Sybase ASE database via ODBC driver&lt;/P&gt;&lt;P&gt;and test if the ODBC driver configuration is valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem can be tested with a simple select statement with a column which does not have a value&lt;/P&gt;&lt;P&gt;i.e. is NULL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the ISNULL function is used here to make sure the column customer_segment is NULL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL&amp;gt; select ISNULL(customer_segment, 'has no value') from test_table where id = 50&lt;/P&gt;&lt;P&gt;+-------------+&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;&lt;P&gt;+-------------+&lt;/P&gt;&lt;P&gt;| has no value|&lt;/P&gt;&lt;P&gt;+-------------+&lt;/P&gt;&lt;P&gt;SQLRowCount returns -1&lt;/P&gt;&lt;P&gt;1 rows fetched&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL&amp;gt; select language, customer_segment from test_table where id = 50&lt;/P&gt;&lt;P&gt;+---------+-----------------+&lt;/P&gt;&lt;P&gt;| language| customer_segment|&lt;/P&gt;&lt;P&gt;+---------+-----------------+&lt;/P&gt;&lt;P&gt;| FI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | FI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;&lt;P&gt;+---------+-----------------+&lt;/P&gt;&lt;P&gt;SQLRowCount returns -1&lt;/P&gt;&lt;P&gt;1 rows fetched&lt;/P&gt;&lt;P&gt;SQL&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone of you seen this before? Is this a known problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks is advance,&lt;/P&gt;&lt;P&gt;Kari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 10:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaq-p/11586221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-10T10:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586222#M4322264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The documentation for 'isnull' states:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;If &lt;/SPAN&gt;&lt;VAR class="varname" style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;expression1&lt;/VAR&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt; parameter is a &lt;/SPAN&gt;char &lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;datatype and &lt;/SPAN&gt;&lt;VAR class="varname" style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;expression2&lt;/VAR&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt; is a literal parameter, the results from your &lt;/SPAN&gt;&lt;SPAN class="cmdname" style="font-weight: bold; color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt; statement that includes &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12.48px; background: #b5d5ff; font-family: Arial, Helvetica, Verdana, sans-serif; font-weight: bold;"&gt;&lt;SPAN style="background-position: initial;"&gt;isnul&lt;/SPAN&gt;l&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt; differ based on whether you enable literal autoparameterization. To avoid this situation, do not autoparameterize &lt;/SPAN&gt;char&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt; datatype literals within &lt;/SPAN&gt;&lt;SPAN class="cmdname" style="font-weight: bold; color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;&lt;SPAN style="background: #b5d5ff;"&gt;&lt;SPAN style="background-position: initial;"&gt;isnul&lt;/SPAN&gt;l&lt;/SPAN&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12.48px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should also check the setting of the 'ansinull' connection property.&amp;nbsp; As you are running from ODBC, the setting may be different than with OpenClient and affecting the behaviour of the 'isnull' function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:15:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586222#M4322264</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2016-03-10T12:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586223#M4322265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I quess you missed my point. The problem I have has nothing to do with ISNULL function.&lt;/P&gt;&lt;P&gt;I just used it to show that the column really is NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that for the NULL columns, the value of the previous column in the SELECT statement is returned, but I need it to remain NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586223#M4322265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-10T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586224#M4322266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry.&amp;nbsp; It was not stated that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would to 2 things -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First - ensure that you have applied the SPs that come with the ODBC driver to the ASE 15.7.&amp;nbsp; They are usually located in a folder under the driver installation and contain scripts that install/patch the metadata for the driver on the ASE side.&amp;nbsp; Just quickly looking at my Windows installation, there is an '$SYBASE/DataAccess64/ODBC/sp/install_odbc_sprocs.bat' script that will determine which actual SQL script to install on an ASE for my 16.0 ODBC drivers.&amp;nbsp; In my case, there is an sp_drv_common_1570020.sql script that would install on an ASE 15.7 server, as opposed to the sp_drv_common_1600000.sql script that would install on an ASE 16.0.&amp;nbsp; You can also just install these scripts via the SDK isql tool as 'sa' as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is required when you upgrade or patch drivers (ODBC, JDBC, etc.) on the client side.&amp;nbsp; Installmaster will install the most recent versions of the drivers (see 'sp_version' output) at that ASE/SDK release version, when you upgrade ASE, but as you are using 16.0 against 15.7, you probably need to install the newer metadata to match your highest level ODBC driver.&amp;nbsp; Drivers are actually in 2 parts (client-side and server-side) to keep them thinner on the client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doesn't solve your issue, try installing the latest SP of the driver with the server-side pieces updated as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second - if nothing works, please log an incident with SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 16:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586224#M4322266</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2016-03-11T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586225#M4322267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One last thing, and it may not relate to this, and was more to do with using the IQ ODBC driver on Linux with 3rd-party driver managers (unixODBC and Datadirect) -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may need to test adding the following to your DSN definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DriverUnicodeType=1&lt;/P&gt;&lt;P&gt;Charset=utf8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With IQ drivers, both settings were needed for Datadirect.&amp;nbsp; The second only may be needed for unixODBC, although this was commented out in the doc I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said, this was for IQ drivers on Linux/Unix, but this may relate.&amp;nbsp; The driver could be returning all results as utf8, regardless of the character set of the server, to work with multilingual applications better.&amp;nbsp; I think these settings tell the driver manager how to translate from the driver to the application.&amp;nbsp; Under the covers, the driver will take care of the actual character set translation to the server anway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 16:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586225#M4322267</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2016-03-11T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586226#M4322268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I installed the patches and tried also parameters DriverUnicodeType and Charset in the DSN definitions, but they did not help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested the ODBC driver on a fresh install of Sybase ASE 16.0 SP2 on an Ubuntu 14.04 virtual machine. The Sybase ODBC driver behaves in the same way i.e. for NULL value column I get the value of the previous column in the SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is strange is that I have no problems accessing the Sybase ASE database from a Windows 7 PC using the ODBC driver from Sybase ASE 16.0 installation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 11:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586226#M4322268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-14T11:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with NULL values using Sybase ODBC driver in Linux</title>
      <link>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586227#M4322269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best thing I can suggest then is to open an incident with SAP.&amp;nbsp; Most likely there is a difference between the ODBC Driver Managers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problem-with-null-values-using-sybase-odbc-driver-in-linux/qaa-p/11586227#M4322269</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2016-03-21T13:18:34Z</dc:date>
    </item>
  </channel>
</rss>

