<?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 SAS 9.4 M2, PostgreSQL 12, cannot delete rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761955#M241183</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have SAS 9.4 M2 and a database on a server with PostgreSQL 12.&lt;/P&gt;&lt;P&gt;We are using a libname with odbc to connect to the server. I can SELECT but I cannot DELETE datat from a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;options nofmterr;

libname db_schema odbc user=**** password=**** datasrc=[database alias in odbc.ini] schema=[schema name] direct_exe=delete;

proc sql;
    /* SELECT WORKS */
    select * from db_schema.tbl_blah_error
    where blah_error_comment LIKE "TEST-1234%";

    /* ERROR - CANNOT DELETE */
    delete from db_schema.tbl_blah_error
    where blah_error_id=104680;
quit;&lt;/PRE&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;I can select from the table just fine&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;I cannot delete from the table, I get the following error&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;I am told that this problem is expected, because&lt;OL&gt;&lt;LI&gt;we have postgresql 12&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;we need to upgrade sas because "they [SAS] wants us to use the psqlODBC driver that they supply with SAS instead of the one you install on the server [the database server?]"&lt;/LI&gt;&lt;LI&gt;I see the driver file name (from our odbc.ini file) is&amp;nbsp;psqlodbcw.so&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;I cannot find any documentation that clearly supports #3 above&lt;OL&gt;&lt;LI&gt;for instance, I can't find a bug or hot fix or whatever that I would normally see for similar problems in the community forums (yay other community users!)&lt;/LI&gt;&lt;LI&gt;we did find this note&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/whatsdiff/p1qjpyniex9epun17ie3st4n3ror.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/whatsdiff/p1qjpyniex9epun17ie3st4n3ror.htm&lt;/A&gt;&amp;nbsp;where it says "&lt;SPAN&gt;SAS 9.4M7 (August 2020) supports PostgreSQL 12." &lt;STRONG&gt;That implies but does not directly indicate that SAS 9.4 less than M7 does not support PostgreSQL 12.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Can anyone point me to documentation listing which version of PostgreSQL SAS 9.4 M2 supports?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;If anyone has seen this problem, is there any known workaround?&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Tue, 17 Aug 2021 00:43:02 GMT</pubDate>
    <dc:creator>yellowcat</dc:creator>
    <dc:date>2021-08-17T00:43:02Z</dc:date>
    <item>
      <title>SAS 9.4 M2, PostgreSQL 12, cannot delete rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761955#M241183</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have SAS 9.4 M2 and a database on a server with PostgreSQL 12.&lt;/P&gt;&lt;P&gt;We are using a libname with odbc to connect to the server. I can SELECT but I cannot DELETE datat from a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;options nofmterr;

libname db_schema odbc user=**** password=**** datasrc=[database alias in odbc.ini] schema=[schema name] direct_exe=delete;

proc sql;
    /* SELECT WORKS */
    select * from db_schema.tbl_blah_error
    where blah_error_comment LIKE "TEST-1234%";

    /* ERROR - CANNOT DELETE */
    delete from db_schema.tbl_blah_error
    where blah_error_id=104680;
quit;&lt;/PRE&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;I can select from the table just fine&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;I cannot delete from the table, I get the following error&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;I am told that this problem is expected, because&lt;OL&gt;&lt;LI&gt;we have postgresql 12&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;we need to upgrade sas because "they [SAS] wants us to use the psqlODBC driver that they supply with SAS instead of the one you install on the server [the database server?]"&lt;/LI&gt;&lt;LI&gt;I see the driver file name (from our odbc.ini file) is&amp;nbsp;psqlodbcw.so&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;I cannot find any documentation that clearly supports #3 above&lt;OL&gt;&lt;LI&gt;for instance, I can't find a bug or hot fix or whatever that I would normally see for similar problems in the community forums (yay other community users!)&lt;/LI&gt;&lt;LI&gt;we did find this note&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/whatsdiff/p1qjpyniex9epun17ie3st4n3ror.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/whatsdiff/p1qjpyniex9epun17ie3st4n3ror.htm&lt;/A&gt;&amp;nbsp;where it says "&lt;SPAN&gt;SAS 9.4M7 (August 2020) supports PostgreSQL 12." &lt;STRONG&gt;That implies but does not directly indicate that SAS 9.4 less than M7 does not support PostgreSQL 12.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Can anyone point me to documentation listing which version of PostgreSQL SAS 9.4 M2 supports?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;If anyone has seen this problem, is there any known workaround?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 17 Aug 2021 00:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761955#M241183</guid>
      <dc:creator>yellowcat</dc:creator>
      <dc:date>2021-08-17T00:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 M2, PostgreSQL 12, cannot delete rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761957#M241185</link>
      <description>the error I get is&lt;BR /&gt;ERROR: Error updating table entry: Only SQL_POSITION/REFRESH is supported for PGAPI_SetPos&lt;BR /&gt;ERROR: ROLLBACK issued due to errors for data set HPTN071D.TBL_ASSAY_FILE_UPLOAD_ERROR.DATA.&lt;BR /&gt;NOTE: Deletes were rolled back by the DBMS software.</description>
      <pubDate>Tue, 17 Aug 2021 00:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761957#M241185</guid>
      <dc:creator>yellowcat</dc:creator>
      <dc:date>2021-08-17T00:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 M2, PostgreSQL 12, cannot delete rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761967#M241187</link>
      <description>&lt;P&gt;SAS does not mandate any ODBC driver.&lt;/P&gt;
&lt;P&gt;Ask the&amp;nbsp;PostgreSQL admins which driver they recommend for your needs and install it on the SAS server.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 03:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/761967#M241187</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-17T03:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 M2, PostgreSQL 12, cannot delete rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/762041#M241225</link>
      <description>Also try Pass-Through SQL.&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;connect to odbc(dsn=xx ........);&lt;BR /&gt;execute ( delete from ...........)&lt;BR /&gt;by odbc;&lt;BR /&gt;quit;</description>
      <pubDate>Tue, 17 Aug 2021 12:56:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/762041#M241225</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-08-17T12:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 M2, PostgreSQL 12, cannot delete rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/763311#M241727</link>
      <description>&lt;P&gt;Thanks Ksharp! I used a connection and executed the query on the remote server.&lt;/P&gt;&lt;P&gt;However, I had to rewrite some of the queries, because they have correlations to local sas datasets.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 17:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-M2-PostgreSQL-12-cannot-delete-rows/m-p/763311#M241727</guid>
      <dc:creator>yellowcat</dc:creator>
      <dc:date>2021-08-23T17:58:52Z</dc:date>
    </item>
  </channel>
</rss>

