<?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: Eliminate rows if more than one in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560952#M156956</link>
    <description>You want the NOUNIQUEKEY option with the UNIQUEOUT option within PROC SORT.&lt;BR /&gt;&lt;BR /&gt;proc sort data=have nouniquekey uniqueout=want;&lt;BR /&gt;by id;&lt;BR /&gt;run;</description>
    <pubDate>Wed, 22 May 2019 19:48:25 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-05-22T19:48:25Z</dc:date>
    <item>
      <title>Eliminate rows if more than one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560948#M156953</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; id Cd $ flg $ DATE1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;DATE9.&lt;/FONT&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;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; date1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;date9.&lt;/FONT&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;datalines&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;11 chg b 13apr2019&lt;/P&gt;
&lt;P&gt;11 chg i 11apr2019&lt;/P&gt;
&lt;P&gt;12 chg e 6may2017&lt;/P&gt;
&lt;P&gt;13 chg b 5jun2019&lt;/P&gt;
&lt;P&gt;14 add d 4mar2019&lt;/P&gt;
&lt;P&gt;14 chg y 1jan2019&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&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;&lt;FONT face="Courier New" size="3"&gt;I want to eliminate all rows where the number of rows per id is more than 1.&amp;nbsp; So In this example I would eliminate 11 and 14 and only keep 12 and 13.&amp;nbsp; Using a proc sort nodupkey would not work in this case.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 19:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560948#M156953</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2019-05-22T19:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate rows if more than one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560950#M156954</link>
      <description>&lt;P&gt;So only keep the IDs that do NOT have multiple rows?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  by id;
  if first.id and last.id;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 May 2019 19:46:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560950#M156954</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-22T19:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate rows if more than one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560951#M156955</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;

input id Cd $ flg $ DATE1 DATE9. ;

format date1 date9.;

datalines;
11 chg b 13apr2019
11 chg i 11apr2019
12 chg e 6may2017
13 chg b 5jun2019
14 add d 4mar2019
14 chg y 1jan2019
;

proc sort data=have nouniquekeys uniqueout=singles ;
by id;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 May 2019 19:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560951#M156955</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-05-22T19:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate rows if more than one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560952#M156956</link>
      <description>You want the NOUNIQUEKEY option with the UNIQUEOUT option within PROC SORT.&lt;BR /&gt;&lt;BR /&gt;proc sort data=have nouniquekey uniqueout=want;&lt;BR /&gt;by id;&lt;BR /&gt;run;</description>
      <pubDate>Wed, 22 May 2019 19:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Eliminate-rows-if-more-than-one/m-p/560952#M156956</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-22T19:48:25Z</dc:date>
    </item>
  </channel>
</rss>

