<?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: Help in removing Duplicates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398138#M96258</link>
    <description>&lt;P&gt;Use SCAN to pull out that 'second' variable 1/2 that's combined with your name.&lt;/P&gt;
&lt;P&gt;Then use PROC SORT to order the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll likely need a data step instead and use FIRST/LAST processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post what you've tried if you're still having issues.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 15:21:04 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-09-22T15:21:04Z</dc:date>
    <item>
      <title>Help in removing Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398135#M96257</link>
      <description>&lt;P&gt;&lt;BR /&gt;I have a data like this.&lt;/P&gt;&lt;P&gt;ID Name Amount&lt;BR /&gt;1 Pink(1) $50-----This is Duplicate&lt;BR /&gt;1 Pink(2) $50-----This is Duplicate&lt;BR /&gt;2 Pink(1) $20&lt;BR /&gt;2 Pink(1) $25&lt;BR /&gt;3 Pink(1) $10&lt;BR /&gt;4 Pink(1) $15&lt;BR /&gt;5 Pink(1) $20----This is not duplicate&lt;BR /&gt;5 Pink(1) $20 ---This is not duplicate&lt;/P&gt;&lt;P&gt;I am trying to remove the duplicate (Id) 1 which have Pink 1 and 2 but with same amount $50.&lt;BR /&gt;Even though the ID 5 seems to be same , that not duplicate.&lt;/P&gt;&lt;P&gt;Pink have 2 categories 1 and 2. If 1 or 2 have same value then its duplciate.Name is a char variable.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 15:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398135#M96257</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-09-22T15:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help in removing Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398138#M96258</link>
      <description>&lt;P&gt;Use SCAN to pull out that 'second' variable 1/2 that's combined with your name.&lt;/P&gt;
&lt;P&gt;Then use PROC SORT to order the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll likely need a data step instead and use FIRST/LAST processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post what you've tried if you're still having issues.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 15:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398138#M96258</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-22T15:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help in removing Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398282#M96324</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID Name $ Amount $;
cards;
1 Pink(1) $50
1 Pink(2) $50
2 Pink(1) $20
2 Pink(1) $25
3 Pink(1) $10
4 Pink(1) $15
5 Pink(1) $20
5 Pink(1) $20
;
run;
proc sql;
create table a as
 select * 
  from have 
   group by id
    having count(distinct name) ne 1;

create table b as
 select * 
  from have 
   group by id
    having count(distinct name) eq 1;
quit;

data aa;
 set a;
 by id Amount;
 if first.Amount;
run;
data want;
 set aa b;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Sep 2017 11:59:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-removing-Duplicates/m-p/398282#M96324</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-09-23T11:59:34Z</dc:date>
    </item>
  </channel>
</rss>

