<?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: Deleting all but one record. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Deleting-all-but-one-record/m-p/76399#M16526</link>
    <description>To put it another way you want to KEEP the last record.;&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data table;&lt;BR /&gt;
   do var1=1 to 10;&lt;BR /&gt;
      var2 = ranuni(1);&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
data last;  &lt;BR /&gt;
   do point=nobs;&lt;BR /&gt;
      set table point=point nobs=nobs;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   stop;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Thu, 05 Mar 2009 19:49:02 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2009-03-05T19:49:02Z</dc:date>
    <item>
      <title>Deleting all but one record.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-all-but-one-record/m-p/76398#M16525</link>
      <description>My table have 2 variables; Var1 and Var2.&lt;BR /&gt;
&lt;BR /&gt;
Every value for Var1 is unique. Var2 can be any real number.&lt;BR /&gt;
&lt;BR /&gt;
I want to delete every record but the &lt;B&gt;last&lt;/B&gt; one.&lt;BR /&gt;
&lt;BR /&gt;
Since the Var1 values are unique both last.Var1 and first.Var1 always have the value 1, so I have no use for them.&lt;BR /&gt;
&lt;BR /&gt;
The number of records can vary for each day.&lt;BR /&gt;
&lt;BR /&gt;
How can I succeed with the deletion?&lt;BR /&gt;
&lt;BR /&gt;
Susan</description>
      <pubDate>Thu, 05 Mar 2009 18:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-all-but-one-record/m-p/76398#M16525</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-05T18:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting all but one record.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-all-but-one-record/m-p/76399#M16526</link>
      <description>To put it another way you want to KEEP the last record.;&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data table;&lt;BR /&gt;
   do var1=1 to 10;&lt;BR /&gt;
      var2 = ranuni(1);&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
data last;  &lt;BR /&gt;
   do point=nobs;&lt;BR /&gt;
      set table point=point nobs=nobs;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   stop;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 05 Mar 2009 19:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-all-but-one-record/m-p/76399#M16526</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-05T19:49:02Z</dc:date>
    </item>
  </channel>
</rss>

