<?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 Proc SQL Delete From - Disk Space in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190990#M36005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I free up the disk space after deleting the data from table? I used Proc SQL - Delete From Statement to delete data from table.&amp;nbsp; However, table size is not reduce.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 18:09:07 GMT</pubDate>
    <dc:creator>newbi</dc:creator>
    <dc:date>2014-04-23T18:09:07Z</dc:date>
    <item>
      <title>Proc SQL Delete From - Disk Space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190990#M36005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I free up the disk space after deleting the data from table? I used Proc SQL - Delete From Statement to delete data from table.&amp;nbsp; However, table size is not reduce.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 18:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190990#M36005</guid>
      <dc:creator>newbi</dc:creator>
      <dc:date>2014-04-23T18:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Delete From - Disk Space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190991#M36006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Trebuchet MS','sans-serif';"&gt;In oracle, When we DELETE rows from the table,&amp;nbsp; all the data get copied into the Rollback Tablespace first then delete operation is performed. ROLLBACK after deleting a table, can bring back deleted data and a COMMIT can remove the rows permanently from the table and this causes to reduce size of table. I would recommend use pure SAS for this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #333333; font-family: 'Trebuchet MS','sans-serif';"&gt;data have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Trebuchet MS','sans-serif';"&gt;set have (obs=0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Trebuchet MS','sans-serif';"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #333333; font-family: 'Trebuchet MS','sans-serif';"&gt;Insert rows which need to be retained in have from the main table and drop the main table. In that you will have a table occupying less space.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 19:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190991#M36006</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-04-23T19:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Delete From - Disk Space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190992#M36007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use a datastep instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lib.table_name;&lt;/P&gt;&lt;P&gt;set lib.table_name (obs=0);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 19:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190992#M36007</guid>
      <dc:creator>skillman</dc:creator>
      <dc:date>2014-04-23T19:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Delete From - Disk Space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190993#M36008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS is great for many things, but data management on a row level isn't one of them.&lt;/P&gt;&lt;P&gt;Deletion of single records will only mark them in the data set as logically deleted. Therefore you won't see any change in file size.&lt;/P&gt;&lt;P&gt;However, if you have compressed tables, you can also chose to have a dataset attribute (option) reuse=yes, this will save disk space over time. The risk with this method is that the internal structure of the data set will be cluttered, and could decrease performance.&lt;/P&gt;&lt;P&gt;So, if you have the possibility to rewrite the whole table, it's the cleanest solution.&lt;/P&gt;&lt;P&gt;If you have some data set attributes you wish to keep, such as indexes and constraints, they will be lost using techniques mentioned above. An easy way to prevent this is bt using proc apend (deleted is a temporary table):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc append data=lib.have(where=(your subset criteria)) base=lib.&lt;EM&gt;deleted&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc datasets lib=lib nolist;&lt;/P&gt;&lt;P&gt;delete have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;rename deleted=have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 21:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190993#M36008</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-04-23T21:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Delete From - Disk Space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190994#M36009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the response.&amp;nbsp; I have resolve the issue by creating new dataeset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 18:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Delete-From-Disk-Space/m-p/190994#M36009</guid>
      <dc:creator>newbi</dc:creator>
      <dc:date>2014-04-25T18:40:27Z</dc:date>
    </item>
  </channel>
</rss>

