<?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: Remove duplicate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681243#M206045</link>
    <description>&lt;P&gt;Show us your code please.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2020 07:03:09 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2020-09-03T07:03:09Z</dc:date>
    <item>
      <title>Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681241#M206044</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to delete the last 3 row where last row "label=B_Contingencies" (highlighted in image).&lt;/P&gt;&lt;P&gt;I tried rownum and partition but seems like sas doesn't support it.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="need to remove last 3 row" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48947i83079ED9EE3E9ACC/image-size/large?v=v2&amp;amp;px=999" role="button" title="duplicate_row.png" alt="need to remove last 3 row" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;need to remove last 3 row&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 06:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681241#M206044</guid>
      <dc:creator>Prabhat_kumar</dc:creator>
      <dc:date>2020-09-03T06:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681243#M206045</link>
      <description>&lt;P&gt;Show us your code please.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 07:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681243#M206045</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-09-03T07:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681247#M206047</link>
      <description>&lt;P&gt;This was throwing error as "Syntax expecting one of the following: !,!!, &amp;amp;, *, **, +,-,/,* &amp;lt;,&amp;gt;,&amp;lt;&amp;gt;,="&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rownumber_partitiion.png" style="width: 943px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48950i4D5227B4CBFC0792/image-size/large?v=v2&amp;amp;px=999" role="button" title="rownumber_partitiion.png" alt="rownumber_partitiion.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 07:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681247#M206047</guid>
      <dc:creator>Prabhat_kumar</dc:creator>
      <dc:date>2020-09-03T07:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681248#M206048</link>
      <description>&lt;P&gt;And what do you expect as result?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 07:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681248#M206048</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-09-03T07:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681250#M206049</link>
      <description>&lt;P&gt;The expected result.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="expected_result.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48951i1B24C1B9E8DAE467/image-size/large?v=v2&amp;amp;px=999" role="button" title="expected_result.png" alt="expected_result.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 07:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681250#M206049</guid>
      <dc:creator>Prabhat_kumar</dc:creator>
      <dc:date>2020-09-03T07:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681258#M206051</link>
      <description>&lt;P&gt;Something like this should&amp;nbsp; work. Code is untested:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   _p = 0;
   
   do _n_ = 1 by 1 until(done);
      set work.have end=done;
      if label = 'INSERT_TEXT' then _p = _n_;
   end;

   do _n_ = 1 by 1 until(_p - 1 = _n_);
      set work.have;
      output;
   end;
   
   drop _p;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Sep 2020 08:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681258#M206051</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-09-03T08:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681366#M206079</link>
      <description>&lt;P&gt;Assuming that 'end' provides some meaningful order, then you can try this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* sort by label and end to group by label;
proc sort data=iqfmt;
by label end;
run;

* then sort by label removing duplicate labels;
proc sort data=iqfmt nodupkey;
by label;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Sep 2020 14:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate/m-p/681366#M206079</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2020-09-03T14:53:23Z</dc:date>
    </item>
  </channel>
</rss>

