<?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 same records in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69100#M19816</link>
    <description>Look at using PROC SORT NODUPKEY and specify the SAS variable(s) of importance (for uniqueness) in the BY statement.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search arguments, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
proc sort nodupkey site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
remove duplicate records site:sas.com

Message was edited by: sbb</description>
    <pubDate>Tue, 24 May 2011 22:20:44 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2011-05-24T22:20:44Z</dc:date>
    <item>
      <title>Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69098#M19814</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
In table that I  have 2 columns provno and liceno as below,&lt;BR /&gt;
&lt;BR /&gt;
NO	Prov	Lice&lt;BR /&gt;
1	100675	100897&lt;BR /&gt;
2	100989	100989&lt;BR /&gt;
3	100897	100897&lt;BR /&gt;
4	100976	100972&lt;BR /&gt;
&lt;BR /&gt;
 In above table the row 1 and 3 has same records; in that case I need to get the report to only identify those cases in which the numbers are different?&lt;BR /&gt;
&lt;BR /&gt;
The reports needs to look like,&lt;BR /&gt;
&lt;BR /&gt;
NO	Prov	Lice&lt;BR /&gt;
1	100675	100897&lt;BR /&gt;
2	100976	100972&lt;BR /&gt;
&lt;BR /&gt;
Can you please me on code to get this report.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 24 May 2011 20:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69098#M19814</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-05-24T20:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69099#M19815</link>
      <description>Hello Raveena,&lt;BR /&gt;
&lt;BR /&gt;
This is a solution:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data i;&lt;BR /&gt;
  retain n;&lt;BR /&gt;
  input NO Prov Lice;&lt;BR /&gt;
  if Prov NE Lice; &lt;BR /&gt;
  n + 1;&lt;BR /&gt;
  drop NO; &lt;BR /&gt;
  rename n=NO;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 100675 100897&lt;BR /&gt;
2 100989 100989&lt;BR /&gt;
3 100897 100897&lt;BR /&gt;
4 100976 100972&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Tue, 24 May 2011 21:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69099#M19815</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-05-24T21:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69100#M19816</link>
      <description>Look at using PROC SORT NODUPKEY and specify the SAS variable(s) of importance (for uniqueness) in the BY statement.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search arguments, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
proc sort nodupkey site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
remove duplicate records site:sas.com

Message was edited by: sbb</description>
      <pubDate>Tue, 24 May 2011 22:20:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69100#M19816</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-05-24T22:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69101#M19817</link>
      <description>Hi SPR,&lt;BR /&gt;
&lt;BR /&gt;
Thanks, it works. I need one more concern,&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Provno	              Liceno&lt;/B&gt; &lt;BR /&gt;
110987-A85	110987&lt;BR /&gt;
117866-B85	117866&lt;BR /&gt;
11347	                  34567&lt;BR /&gt;
002478-A19	002479&lt;BR /&gt;
&lt;BR /&gt;
My report needs to look like as below,&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Provno    	Liceno&lt;/B&gt; &lt;BR /&gt;
11347	                  34567&lt;BR /&gt;
002478-A19	002479&lt;BR /&gt;
&lt;BR /&gt;
In above example, need to get only the records which are different(only 3 and 4 row) and the 1 and 2 row considered as same so it should be eliminate from the report. The reason is that the first 6 numerics match the numerics contained in the liceno field. In essence 119966 matches 119966.&lt;BR /&gt;
&lt;BR /&gt;
Please let me know .&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Wed, 25 May 2011 14:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69101#M19817</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-05-25T14:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69102#M19818</link>
      <description>This is a possible solution:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data i;&lt;BR /&gt;
  retain no;&lt;BR /&gt;
  input Provno $ 1-10 Liceno $ 12-17;&lt;BR /&gt;
  if SUBSTR(Provno,1,6) NE Liceno;&lt;BR /&gt;
  no + 1;&lt;BR /&gt;
  datalines;&lt;BR /&gt;
110987-A85 110987&lt;BR /&gt;
117866-B85 117866&lt;BR /&gt;
11347      34567&lt;BR /&gt;
002478-A19 002479&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 25 May 2011 15:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69102#M19818</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-05-25T15:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69103#M19819</link>
      <description>Thanks SPR !!</description>
      <pubDate>Wed, 25 May 2011 15:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69103#M19819</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-05-25T15:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate same records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69104#M19820</link>
      <description>[pre]&lt;BR /&gt;
data i;&lt;BR /&gt;
  input Provno $ 1-10 Liceno $ 12-17;&lt;BR /&gt;
  if Provno NE: strip(Liceno);&lt;BR /&gt;
  datalines;&lt;BR /&gt;
110987-A85 110987&lt;BR /&gt;
117866-B85 117866&lt;BR /&gt;
11347      34567&lt;BR /&gt;
002478-A19 002479&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 27 May 2011 09:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Eliminate-same-records/m-p/69104#M19820</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-05-27T09:51:20Z</dc:date>
    </item>
  </channel>
</rss>

