<?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: SAS Error when using &amp;quot;delete from&amp;quot; to remove rows from SQL table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468412#M14650</link>
    <description>&lt;P&gt;Thank you, I will check with the DBA&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 15:31:26 GMT</pubDate>
    <dc:creator>Jade_SAS</dc:creator>
    <dc:date>2018-06-07T15:31:26Z</dc:date>
    <item>
      <title>SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467859#M14622</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am running SAS on the SAS server, I try to use "Delete from" to delete rows from a table at SQL server, but ran into error. Please shed your light why I got this error. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The coding I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DELETE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; SQLlib.TEST;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message is as below:&lt;/P&gt;&lt;P&gt;ERROR: CLI execute error: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]A cursor with the name&lt;/P&gt;&lt;P&gt;'SQL_CURE0D90EA04B2B0000' does not exist.&lt;/P&gt;&lt;P&gt;ERROR: ROLLBACK issued due to errors for data set &lt;FONT face="Courier New"&gt;SQLlib.TEST&lt;/FONT&gt;.DATA.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467859#M14622</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-05T21:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467865#M14623</link>
      <description>&lt;P&gt;What happens if you do select * from the same table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select * from SQLlib.TEST;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is it possible you have only read only access to the table and cannot delete records?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467865#M14623</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-05T21:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467899#M14624</link>
      <description>&lt;P&gt;Remove asterisk(*)&amp;nbsp; symbol.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DELETE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SQLlib.TEST;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 23:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467899#M14624</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-05T23:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467921#M14630</link>
      <description>&lt;P&gt;Thank you! I can insert table into it, so I think I have write right.&lt;/P&gt;&lt;P&gt;Also I tried on the SQL server directly, I can use "delete from" on the SQL server for that table&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 01:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467921#M14630</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-06T01:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467923#M14631</link>
      <description>&lt;P&gt;Yes, I did try "&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DELETE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SQLlib.TEST;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;" and got the same error. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;I can use the same coding for any files at SAS server, but not with the SQL server tables. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 01:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467923#M14631</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-06T01:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467927#M14632</link>
      <description>&lt;P&gt;Can you check if this is causing the issue &amp;gt;&amp;gt; &lt;A href="http://support.sas.com/kb/57/757.html" target="_blank"&gt;http://support.sas.com/kb/57/757.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 01:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467927#M14632</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-06T01:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467937#M14633</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes, I did try "&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DELETE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SQLlib.TEST;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;" and got the same error. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;I can use the same coding for any files at SAS server, but not with the SQL server tables. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suspect that's a permissions issue then, can you verify with your DBA that you have the correct privileges and can delete records from tables.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 02:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/467937#M14633</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-06T02:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468233#M14644</link>
      <description>&lt;P&gt;Thank you, will check this.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 02:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468233#M14644</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-07T02:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468235#M14645</link>
      <description>&lt;P&gt;Thank you. I even can use this statement to drop table as below:&lt;/P&gt;&lt;P&gt;%_eg_conditional_dropds(SQLlib.TEST);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also checked with the DBA, he said I have the read and write right.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 02:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468235#M14645</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-07T02:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468339#M14647</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you. I even can use this statement to drop table as below:&lt;/P&gt;
&lt;P&gt;%_eg_conditional_dropds(SQLlib.TEST);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also checked with the DBA, he said I have the read and write right.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;Read allows for SELECT, Write allows for INSERT.... doesn't mean you're allowed to DELETE.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-object-permissions-transact-sql?view=sql-server-2017&amp;nbsp;" target="_blank"&gt;https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-object-permissions-transact-sql?view=sql-server-2017&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 12:39:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468339#M14647</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-07T12:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468412#M14650</link>
      <description>&lt;P&gt;Thank you, I will check with the DBA&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:31:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468412#M14650</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-07T15:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468518#M14654</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Checked I do have Delete from right because I can&amp;nbsp;use the "Delete from" at the SQL studio with same table, but could not do it in SAS.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 20:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468518#M14654</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-07T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468546#M14655</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Given that a SELECT or INSERT clause also works out of SAS for this table, everything "connectivity" appears to be o.k.&lt;/P&gt;
&lt;P&gt;Is the user with SQL Studio and SAS the same? And if you've got working code in SQL Studio then why don't you just copy/paste this working code 1:1 into an explicit pass-through SQL in SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 22:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/468546#M14655</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-07T22:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/469831#M14686</link>
      <description>A long shot perhaps, but since you are getting some sort of CL error, try out the USE_ODBC_CL=YES libname option.</description>
      <pubDate>Wed, 13 Jun 2018 04:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/469831#M14686</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-06-13T04:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/470630#M14731</link>
      <description>&lt;P&gt;Will try that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the explicit SQP Pass through, I got the same error of "Delete From"&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/470630#M14731</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-06-15T15:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/477055#M14932</link>
      <description>&lt;P&gt;I got an different error after trying to add&lt;/P&gt;&lt;P&gt;"&lt;FONT color="#0000ff" face="Courier New"&gt;USE_ODBC_CL&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=YES&lt;/FONT&gt; to the libname statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Error updating table entry: [DataDirect][ODBCCUR lib] Driver not capable&lt;/P&gt;&lt;P&gt;BTW, I am using SQLSVR for libname&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 12:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/477055#M14932</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-07-11T12:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/479115#M14962</link>
      <description>SQL DBA changed something on the SQL server, so right now the explicit SQL Pass through worked. if using the delete from directly in SAS coding, it does not work. But at least we have the explicit SQL pass through solution for now. thank you, everyone!</description>
      <pubDate>Wed, 18 Jul 2018 15:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/479115#M14962</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2018-07-18T15:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/479238#M14963</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The answer provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83078"&gt;@SuryaKiran&lt;/a&gt;&amp;nbsp;is the hint that would enable someone to come up with the solution to this specific problem (with a pretty big caveat - addressed below)...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this example I am using a DSN-less connection in the LIBNAME statement because it makes it easier (for me) and helps make the option obvious. Feel free to take a look at the &lt;A href="http://support.sas.com/kb/57/757.html" target="_self"&gt;SAS Note&lt;/A&gt; for an example of&amp;nbsp;adding the EnableScrollableCursors= option&amp;nbsp;using the ODBC Admin application on Windows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssql sqlsvr complete="DRIVER={SAS ACCESS to SQL Server};HOST='mysqlserver.mycomputer.com';
PORT=1433;UID=myuser;PWD=mypassword;";


proc sql;
   create table mssql.cars 
      as select * from sashelp.cars;
quit;


proc sql;
   delete from mssql.cars;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This results in the error&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&amp;nbsp;reported.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;ERROR: CLI execute error: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]A cursor
with the name 'SQL_CURA06FE22B00000000' does not exist.
ERROR: ROLLBACK issued due to errors for data set MSSQL.cars.DATA.&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Add the EnableScrollableCursors=3 option and it works...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssql sqlsvr complete="DRIVER={SAS ACCESS to SQL Server};HOST='mysqlserver.mycomputer.com';
PORT=1433;UID=myuser;PWD=mypassword;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;EnableScrollableCursors=3&lt;/STRONG&gt;"; &lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;  delete from mssql.cars;&lt;BR /&gt;quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1865 proc sql;
1866 delete from mssql.cars;
NOTE: 428 rows were deleted from MSSQL.cars.

1867 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.76 seconds
cpu time 0.11 seconds&lt;/PRE&gt;
&lt;P&gt;It is important to note that DBIDIRECTEXEC does not work with SAS/ACCESS Interface to Microsoft SQL Server. This means SAS opens a cursor and deletes each row individually. This is fine for small tables but would be very slow and resource intensive for large DELETEs. The reason is that the rows are deleted individually using WHERE CURRENT OF clause (this uses a scrollable cursor and is the reason the error message appears). By default the Data Direct ODBC driver has scrollable cursors disabled probably because of the performance impact of using them. The DIRECT_EXE= option can be used to force the deletes into SQL Server.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The caveat:&lt;/STRONG&gt; The Explicit Pass-Through approach forces the database to handle the DELETE and will be faster. Even better, use explicit pass-through with the Transact-SQL TRUNCATE command:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/statements/truncate-table-transact-sql?view=sql-server-2017" target="_self"&gt;https://docs.microsoft.com/en-us/sql/t-sql/statements/truncate-table-transact-sql?view=sql-server-2017&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 19:54:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/479238#M14963</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-08-03T19:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/641109#M19135</link>
      <description>What will happen if the datasets listed in proc sql delete from is not available? &lt;BR /&gt;&lt;BR /&gt;Requirement is to delete multiple datasets in one step and sometimes some of the datasets won't be available for delete. &lt;BR /&gt;&lt;BR /&gt;Will it throws an error or warning?</description>
      <pubDate>Sun, 19 Apr 2020 16:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/641109#M19135</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2020-04-19T16:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Error when using "delete from" to remove rows from SQL table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/641134#M19136</link>
      <description>It'll throw warnings.</description>
      <pubDate>Sun, 19 Apr 2020 18:29:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Error-when-using-quot-delete-from-quot-to-remove-rows-from/m-p/641134#M19136</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-19T18:29:28Z</dc:date>
    </item>
  </channel>
</rss>

