<?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 Reg:Deleting the obs (Any Tuncate in SAS) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26298#M4677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; No Actually is there any thing to delete all the observations in a table .in a tabale i am having 5 crores of data &lt;/P&gt;&lt;P&gt;so i want to delete them at once how can i do .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jan 2012 09:55:59 GMT</pubDate>
    <dc:creator>sas_Forum</dc:creator>
    <dc:date>2012-01-09T09:55:59Z</dc:date>
    <item>
      <title>Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26296#M4675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;deleteing the obs&lt;/P&gt;&lt;P&gt;Hi I am having 5 crores obs obs with 80 variables i want to delete the obs.I have tryed&lt;BR /&gt;delete * from but it was taking more time.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tryed&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set want(obs=0);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;it works but is there any alternate to delete the obs from the table at once&lt;BR /&gt;as truncate table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any thing like truncate table in sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 06:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26296#M4675</guid>
      <dc:creator>sas_Forum</dc:creator>
      <dc:date>2012-01-09T06:57:38Z</dc:date>
    </item>
    <item>
      <title>Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26297#M4676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you want to create a null table without any one obs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt; create table want like sashelp.class;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 09:03:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26297#M4676</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-01-09T09:03:19Z</dc:date>
    </item>
    <item>
      <title>Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26298#M4677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; No Actually is there any thing to delete all the observations in a table .in a tabale i am having 5 crores of data &lt;/P&gt;&lt;P&gt;so i want to delete them at once how can i do .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 09:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26298#M4677</guid>
      <dc:creator>sas_Forum</dc:creator>
      <dc:date>2012-01-09T09:55:59Z</dc:date>
    </item>
    <item>
      <title>Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26299#M4678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; So, you want to delete all 50 million rows from the dataset, leaving the same dataset containing no rows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; foo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; foo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; foo &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;like&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; foo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 15:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26299#M4678</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-01-09T15:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26300#M4679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your data step code looks o.k. to me. You could also code it like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;stop;&lt;/P&gt;&lt;P&gt;set want;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL delete * takes more time because it's actually not truncating the table but only marking rows for deletion - so it has to process all rows AND the table keeps its size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 03:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26300#M4679</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-01-10T03:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26301#M4680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data foo;&lt;/P&gt;&lt;P&gt; if _n_=0 then set foo;&lt;/P&gt;&lt;P&gt; stop;&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 04:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26301#M4680</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-01-10T04:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Deleting the obs (Any Tuncate in SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26302#M4681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Patrick said. It will waste you lots of time.&lt;/P&gt;&lt;P&gt;But there is another statement to delete all obs in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data class;
 set sashelp.class;
 label sex='gender';
 format weight dollar12.;
run;

proc sql;
 delete * from class;
quit;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 05:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Deleting-the-obs-Any-Tuncate-in-SAS/m-p/26302#M4681</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-01-10T05:21:42Z</dc:date>
    </item>
  </channel>
</rss>

