DATA Step, Macro, Functions and more

Proc sort nodup problem

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 128
Accepted Solution

Proc sort nodup problem

Hi guys,

 

I have a table with many records per id.  I want one record just of each id variable.  I have tried different combinations of this, and nothing is working.  I end up with exactly the same number of records as the table going into the sort.

 

?!?!?

 

proc sort data=junk.new_costs_&yr._filtered nodup out=junk.npats (keep=usrds_id); by usrds_id; run;

 

proc sort data=junk.new_costs_&yr._filtered out=junk.npats (keep=usrds_id) nodup; by usrds_id; run;

 

proc sort data=junk.new_costs_&yr._filtered nodup (keep=usrds_id)  out=junk.npats; by usrds_id; run;

 

 

15       !  proc sort data=junk.new_costs_&yr._filtered nodup out=junk.npats (keep=usrds_id); by usrds_id; run;

NOTE: There were 41013989 observations read from the data set JUNK.NEW_COSTS_2014_FILTERED.
NOTE: 0 duplicate observations were deleted.
NOTE: The data set JUNK.NPATS has 41013989 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           21:43.46
      cpu time            1:21.97

 

 

Thanks

Megan


Accepted Solutions
Solution
‎07-01-2016 09:05 PM
Frequent Contributor
Posts: 128

Re: Proc sort nodup problem

Nevermind, i got it.  nodupkey worked.  In pretty much any order

View solution in original post


All Replies
Solution
‎07-01-2016 09:05 PM
Frequent Contributor
Posts: 128

Re: Proc sort nodup problem

Nevermind, i got it.  nodupkey worked.  In pretty much any order

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 224 views
  • 0 likes
  • 1 in conversation