<?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: 6-ways of removing duplicate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125017#M260127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explaint the 4th way of removing the duplicate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Jan 2014 19:52:18 GMT</pubDate>
    <dc:creator>Rahul_SAS</dc:creator>
    <dc:date>2014-01-18T19:52:18Z</dc:date>
    <item>
      <title>6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124984#M260094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to find out 5-6 ways of removing duplicates from a dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 09:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124984#M260094</guid>
      <dc:creator>AnandSahu</dc:creator>
      <dc:date>2013-07-02T09:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124985#M260095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally we use bellow method's to remove duplicate observations from the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Nodup(Proc Sort)&lt;/P&gt;&lt;P&gt;2.nodupkey(Proc Sort)&lt;/P&gt;&lt;P&gt;3.Disticnt(Proc Sql )&lt;/P&gt;&lt;P&gt;4.First. and last . variables(In Datastep)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 10:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124985#M260095</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2013-07-02T10:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124986#M260096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;5. proc freq ;&lt;/P&gt;&lt;P&gt;6.proc means;&lt;/P&gt;&lt;P&gt;7.proc summary;&lt;/P&gt;&lt;P&gt;8.HashTable&lt;/P&gt;&lt;P&gt;9. proc tabulate&lt;/P&gt;&lt;P&gt;10.proc report&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 10:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124986#M260096</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T10:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124987#M260097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="645292" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes i do agree with your Additional ways to remove duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to remove duplicates in Proc Sql with NODUP KAY functionality ?? as Distinct Works similar to NODUP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 10:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124987#M260097</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2013-07-02T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124988#M260098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is that mean ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select distinct id,name ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select distinct cats(id,name)&amp;nbsp; ?&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;select distinct sex,age from sashelp.class;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 11:20:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124988#M260098</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T11:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124989#M260099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to elaborate my question with bellow example .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Dataset looks like this.&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fee&lt;/P&gt;&lt;P&gt;100&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000&lt;/P&gt;&lt;P&gt;100&amp;nbsp;&amp;nbsp;&amp;nbsp; 3000&lt;/P&gt;&lt;P&gt;101&amp;nbsp;&amp;nbsp;&amp;nbsp; 4000&lt;/P&gt;&lt;P&gt;101&amp;nbsp;&amp;nbsp;&amp;nbsp; 3200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Sql;&lt;/P&gt;&lt;P&gt;Select Distinct ID,Fee from XX;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;(OR)&lt;/P&gt;&lt;P&gt;Proc sort data=XX nodup;&lt;/P&gt;&lt;P&gt;by ID;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above code will display all the data.because fee is different with in the same ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in the case of&lt;/P&gt;&lt;P&gt;Proc Sort Data=XX nodupkey;&lt;/P&gt;&lt;P&gt;by ID;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;above code will generate only 2 rows (100 and 101).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we achieve the same by using Proc SQL??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 11:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124989#M260099</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2013-07-02T11:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124990#M260100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select Distinct ID,Fee from XX group by id having fee=max(fee) ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 11:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124990#M260100</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T11:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124991#M260101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may not be much familiar with all ways but trying my best.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1)&amp;nbsp; proc sort data=DSN noduprecs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by _all_ ; Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2) Proc sort data=DSN out=sample nodupkey dupout=Duplicate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by var1;&amp;nbsp;&amp;nbsp; Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(3) Proc Sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table unique as select distinct (*) from DSN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(4) proc freq data=DSN noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables variable/out=unique (Keep=variable count where=(count=1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(5) Proc sort data=DSN&amp;nbsp;&amp;nbsp;&amp;nbsp; out=temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by variable ;&amp;nbsp;&amp;nbsp; Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data Unique;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by variable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not first.variable and last.variable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 18:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124991#M260101</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2013-07-02T18:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124992#M260102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx uma...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to remove duplicateS with the help of PROC APPEND and MERG as well?????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 18:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124992#M260102</guid>
      <dc:creator>AnandSahu</dc:creator>
      <dc:date>2013-07-02T18:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124993#M260103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand, to use merge &amp;amp; append, you need to sort the observation &amp;amp; while sorting Nodup key take cares of dup records!!!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 02:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124993#M260103</guid>
      <dc:creator>sunilzood</dc:creator>
      <dc:date>2013-07-03T02:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124994#M260104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(5) is wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 02:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124994#M260104</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-03T02:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124995#M260105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(5) &lt;STRONG&gt;Proc sort data=DSN&amp;nbsp;&amp;nbsp;&amp;nbsp; out=temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by variable ;&amp;nbsp;&amp;nbsp; Run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data Unique;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by variable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.variable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 03:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124995#M260105</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-07-03T03:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124996#M260106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Absolutely&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 04:35:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124996#M260106</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-03T04:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124997#M260107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx PG State for providing a ans.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 05:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124997#M260107</guid>
      <dc:creator>AnandSahu</dc:creator>
      <dc:date>2013-07-03T05:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124998#M260108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for 5th one....Thanks for correcting that....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 05:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124998#M260108</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2013-07-03T05:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124999#M260109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;different ways of identifying&amp;nbsp; duplicates or in other words subsetting just the duplicates into a new dataset&lt;/STRONG&gt;&lt;/SPAN&gt;, perhaps I should have posted a new question however I thought I would add here as I noticed you and PG Sir got involved in the thread, got me excited, also others can learn too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers from England,&lt;/P&gt;&lt;P&gt;Charlotte&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S I have a feeling, key= option/unique in set statement can perhaps be used for remving duplicates on a self merge?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/124999#M260109</guid>
      <dc:creator>CharlotteCain</dc:creator>
      <dc:date>2013-07-03T09:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125000#M260110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="1617" data-externalid="" data-presence="null" data-userid="816360" data-username="CharlotteCain" href="https://communities.sas.com/people/CharlotteCain" id="jive-81636073331458805624803" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba; text-decoration: underline;"&gt;CharlotteCain&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to create a new dataset with all duplicates observations ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, here is the way..&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Proc sort data=DSN out=sample nodupkey dupout=Duplicate;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by var1; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;A new dataset duplicate will be created and it contains all duplicate observations from DSN dataset.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;You can achive the same by using Data step as well.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;like&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Proc sort data=DSN&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by var1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data Unique Duplicates;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set DSN;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;by Var1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If First.Var1 then Output &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Unique&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;else output &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Duplicates&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hope this helps.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Regards.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125000#M260110</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2013-07-03T09:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125001#M260111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its looks fine only when i have two variables in the dataset.but what in the case of dataset set having 10 or more variables and still i want to remove observation based on one variable in Proc SQL ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125001#M260111</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2013-07-03T09:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125002#M260112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just list it in SELECT clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select id,free,xx,xx,.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125002#M260112</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-03T10:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: 6-ways of removing duplicate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125003#M260113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select Distinct Id,fee,xx,xx,xx,xx,,,,,?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will It remove Duplicates based on ID variable? Not sure..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/6-ways-of-removing-duplicate/m-p/125003#M260113</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2013-07-03T10:31:15Z</dc:date>
    </item>
  </channel>
</rss>

