<?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 Difference between NOdup and NoDupkey..?? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29490#M66149</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt; &lt;BR /&gt; Can any one please let me know the difference between NoDup and NoDupKey in PROC SORT?&lt;BR /&gt; &lt;BR /&gt; Thanks,&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2016 16:56:49 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2016-10-31T16:56:49Z</dc:date>
    <item>
      <title>Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29490#M66149</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt; &lt;BR /&gt; Can any one please let me know the difference between NoDup and NoDupKey in PROC SORT?&lt;BR /&gt; &lt;BR /&gt; Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 16:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29490#M66149</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2016-10-31T16:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29491#M66150</link>
      <description>&lt;P&gt;NODUP will delete duplicated observations (records that are identical to each other) while NODUPKEY will delete those observations that have duplicate BY&amp;nbsp;values (the sort BY variables that you name in PROC SORT).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas﻿&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here are just a few of the papers and Tech Support notes on the subject:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/324-2013.pdf" target="_self"&gt;Paper: Dealing with Duplicates&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://support.sas.com/kb/1/566.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://support.sas.com/kb/1/566.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://support.sas.com/kb/22/382.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://support.sas.com/kb/22/382.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/069-2007.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www2.sas.com/proceedings/forum2007/069-2007&lt;WBR /&gt;.pdf&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www2.sas.com/proceedings/sugi30/037-30.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www2.sas.com/proceedings/sugi30/037-30.pdf&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www2.sas.com/proceedings/sugi31/164-31.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www2.sas.com/proceedings/sugi31/164-31.pdf&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;To find these, I went to support.sas.com and entered &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; NODUP NODUPKEY &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the search box.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 17:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29491#M66150</guid>
      <dc:creator>KevinQin</dc:creator>
      <dc:date>2016-10-31T17:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29492#M66151</link>
      <description>Hi:&lt;BR /&gt;
  Here are just a few of the papers and Tech Support notes on the subject:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/1/566.html" target="_blank"&gt;http://support.sas.com/kb/1/566.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/22/382.html" target="_blank"&gt;http://support.sas.com/kb/22/382.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/069-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/069-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/037-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/037-30.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi31/164-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/164-31.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
To find these, I went to support.sas.com and entered &lt;BR /&gt;
NODUP NODUPKEY &lt;BR /&gt;
in the search box.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 08 Jul 2008 03:57:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29492#M66151</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-07-08T03:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29493#M66152</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
      Thank you for your help. Given me a valuable information with examples.&lt;BR /&gt;
&lt;BR /&gt;
Kind Regards,&lt;BR /&gt;
Kamal.</description>
      <pubDate>Tue, 08 Jul 2008 14:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29493#M66152</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-08T14:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29494#M66153</link>
      <description>Hi Kevin,&lt;BR /&gt;
&lt;BR /&gt;
   Thank you for the info.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Kamal.</description>
      <pubDate>Tue, 08 Jul 2008 14:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29494#M66153</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-08T14:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/333132#M75026</link>
      <description>&lt;P&gt;HOWEVER, NODUP (or NODUPRECS) may mean two different things depending upon your options settings.&lt;/P&gt;
&lt;P&gt;OPTIONS SORTDUP=&amp;nbsp; has two options: PHYSICAL and LOGICAL.&amp;nbsp; They perform differently.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DL&gt;
&lt;DT&gt;&lt;SPAN class="strong"&gt;PHYSICAL &lt;/SPAN&gt;removes duplicates based on all the variables that are present in the data set. This is the default.&lt;/DT&gt;
&lt;DT&gt;&lt;SPAN class="strong"&gt;LOGICAL &lt;/SPAN&gt;removes duplicates based on only the variables remaining after the DROP= and KEEP= data set options are processed.&lt;/DT&gt;
&lt;/DL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SORTDUP= option specifies what variables to sort to remove duplicate observations when the SORT procedure NODUPRECS option is specified.&lt;/P&gt;
&lt;P&gt;When SORTDUP= is set to LOGICAL and NODUPRECS is specified in the SORT procedure, duplicate observations are removed based on the variables that remain after a DROP or KEEP operation on the input data set. Setting SORTDUP=LOGICAL increases the number of duplicate observations that are removed because it eliminates variables before observations are compared. Setting SORTDUP=LOGICAL might improve performance.&amp;nbsp; [This is a very awkward explanation from SAS documentation.&amp;nbsp; LOGICAL may eliiminate more observations because observations are deduped AFTER variables have been eliminated.]&lt;/P&gt;
&lt;P&gt;When SORTDUP= is set to PHYSICAL and NODUPRECS is specified in the SORT procedure, duplicate observations are removed based on all of the variables in the input data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SORTDUP option does not affect the behavior of NODUPKEY in the SORT procedure.&amp;nbsp; With NODUPKEY you specify the variables to be used to elimnate duplicates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ALSO note that when you use EITHER the NODUP/NODUPRECS or the NODUPKEY modifying option, the "first" record in the sort order is maintained and all subsequent observations are eliminated.&amp;nbsp; Therefore the order in which variables are sorted will make a difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;OPTIONS SORTDUP=PHYSICAL ;&lt;/P&gt;
&lt;P&gt;PROC SORT DATA=dataset NODUPRECS ; BY ID LAST_NAME FIRST_NAME&amp;nbsp;DATE ; RUN ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *I sort the data and all duplicate records based on all variables are eliminated.&lt;/P&gt;
&lt;P&gt;PROC SORT DATA=dataset NODUPKEY ; BY ID LAST_NAME FIRST_NAME ; RUN ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *The data are not really resorted this time, but they are "deduped" so that I have only 1 record per last-name/first-name AND I retain the record with the earliest date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But maybe I wanted the latest record, i.e. the record for each person with the most recent date.&amp;nbsp; Then I would have to do the following:&lt;/P&gt;
&lt;P&gt;PROC SORT DATA=dataset NODUPRECS ; BY ID LAST_NAME FIRST_NAME&amp;nbsp; DATE&amp;nbsp; DESCENDING ; RUN ;&lt;/P&gt;
&lt;P&gt;PROC SORT DATA=dataset NODUPKEY ; BY ID LAST_NAME FIRST_NAME ; RUN ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Because I sorted the data so that the most recent date comes first in the sort order, when I "dedupe" I retain the record with the msot recent date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 19:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/333132#M75026</guid>
      <dc:creator>bbenbaruch</dc:creator>
      <dc:date>2017-02-15T19:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/333280#M75071</link>
      <description>&lt;P&gt;No one seems to have mentioned the biggest difference (although it probably&amp;nbsp;is in one of the articles linked by Cynthia).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The NODUP option will sometimes NOT remove all of the duplicates.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is because it compares ADJACENT records and only keeps the first. &amp;nbsp;But if there are two duplicate records separated from each other by one or more records that are different then both are kept. &amp;nbsp;Try this simple example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input a b ;
cards;
1 1
1 2
1 1
2 1
;

proc sort data=have nodup out=nodup ;
  by a ;
run;

proc sort data=have nodupkey out=nodupkey;
  by a ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The NODUP output dataset will have all four observations since each observation is different than the one next to it. &amp;nbsp;The NODUPKEY output dataset will have only two observations since there are only two distinct values of A.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 04:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/333280#M75071</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-16T04:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/333509#M75149</link>
      <description>&lt;P&gt;Tom makes a good point about the way NODUP works.&amp;nbsp; The key is to remember that when you do deduping you may have forgotten a detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at Tom's code (which illustrates his point very well) and my code above which solved the problem of deduping without pointing out the details that Tom stressed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom's structure is to use similar SORT procedures, the first time using NODUP and the second time using NODUPKEY:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=data NODUP ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by A&amp;nbsp; ; run ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=data NODUPKEY ;&amp;nbsp; by A&amp;nbsp; ; run ;&lt;/P&gt;
&lt;P&gt;My structure was slightly -- but significantly different for precisely the reason Tom pointed out:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=data NODUP ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by A B&amp;nbsp;C ; run ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sort data=data NODUPKEY ;&amp;nbsp; by A&amp;nbsp;B&amp;nbsp;&amp;nbsp;&amp;nbsp; ; run ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Adding the&amp;nbsp;2nd variable in the first sort makes no difference in what records are removed.&amp;nbsp; But it does sort the variables A and B and C so that I can choose which record I want to keep.&amp;nbsp;&amp;nbsp;I sorted on more variables than I was interested in deduping in the first sort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I want to dedupe on ALL variables, then I have to do one of the following:&lt;/P&gt;
&lt;P&gt;1) Sort on all of the variables.&lt;/P&gt;
&lt;P&gt;2) Use PROC SQL ; SELECT DISTINCT * FROM DATA ; QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS SORTDUP=LOGICAL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC SORT DATA=data NODUP ; BY _ALL_ ; RUN ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* and if my I want SORTDUP=PHYSICAL to be my default, then reset it */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; PROC OPTIONS SORTDUP=PHYSICAL ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 17:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/333509#M75149</guid>
      <dc:creator>bbenbaruch</dc:creator>
      <dc:date>2017-02-16T17:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/353979#M82706</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one more question on sorting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
input a b c;
cards;
1 2 3
4 5 6
1 2 3
1 4 5
4 3 2
;
run;

proc sort data=want nodup out= have;
by a ;
run;&lt;/PRE&gt;
&lt;P&gt;I have 5 observations and when I sort I get only 4 observations only. Can any one explain why there is decrease in row count&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 04:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/353979#M82706</guid>
      <dc:creator>SJN</dc:creator>
      <dc:date>2017-04-27T04:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/354204#M82825</link>
      <description>&lt;P&gt;Both NODUP/NODUPRECS and NODUPKEY delete duplicates.&lt;/P&gt;
&lt;P&gt;If you don't want duplicate records deleted, don't ask SAS to delete records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NODUP (aka NODUPRECS) deletes dulicate records. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;NODUPKEY deletes records based on the BY variables. &amp;nbsp;If two records have the same values on all of the BY variables only one record will be kept even if these records have different values on other variables. &amp;nbsp;If it matters to you which record is kept, then you need to do some additional processing before running PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(What constitutes a duplicate record depends upon the SORTDUP system options setting.. SORTDUP s&lt;SPAN class="shortDesc"&gt;pecifies whether the SORT procedure removes duplicate variables based on all variables in a data set or the variables that remain after the DROP or KEEP data set options have been applied.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;input a b c;&lt;BR /&gt;cards;&lt;BR /&gt;1 2 3&lt;BR /&gt;4 5 6&lt;BR /&gt;1 2 3&lt;BR /&gt;1 4 5&lt;BR /&gt;4 3 2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=want out= have;&lt;BR /&gt;by a ;&lt;BR /&gt;run;&lt;BR /&gt;*NOTE: There were 5 observations read from the data set WORK.WANT.&lt;BR /&gt;NOTE: The data set WORK.HAVE has 5 observations and 3 variables. ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=want nodupkey out= have;&lt;BR /&gt;by a ;&lt;BR /&gt;run;&lt;BR /&gt;*NOTE: There were 5 observations read from the data set WORK.WANT.&lt;BR /&gt;NOTE: 3 observations with duplicate key values were deleted.&lt;BR /&gt;NOTE: The data set WORK.HAVE has 2 observations and 3 variables.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=want nodup out= have;&lt;BR /&gt;by a ;&lt;BR /&gt;run;&lt;BR /&gt;*NOTE: There were 5 observations read from the data set WORK.WANT.&lt;BR /&gt;NOTE: 1 duplicate observations were deleted.&lt;BR /&gt;NOTE: The data set WORK.HAVE has 4 observations and 3 variables. ;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 17:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/354204#M82825</guid>
      <dc:creator>bbenbaruch</dc:creator>
      <dc:date>2017-04-27T17:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between NOdup and NoDupkey..??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/354213#M82828</link>
      <description>&lt;P&gt;There is a decrease in the row count because your first and third rows are the same and you told PROC SORT to delete duplicate rows.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/57222"&gt;@SJN&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one more question on sorting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
input a b c;
cards;
1 2 3
4 5 6
1 2 3
1 4 5
4 3 2
;
run;

proc sort data=want nodup out= have;
by a ;
run;&lt;/PRE&gt;
&lt;P&gt;I have 5 observations and when I sort I get only 4 observations only. Can any one explain why there is decrease in row count&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 17:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/354213#M82828</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-27T17:43:26Z</dc:date>
    </item>
  </channel>
</rss>

