LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Apr 2007 22:39:40 -0700
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: Dups and date - urgent
In-Reply-To:  <1176932522.324991.189670@n76g2000hsh.googlegroups.com>
Content-Type: text/plain; format=flowed

sdlentert@AOL.COM wrote: > >Urgent! Need help...

I'm sorry, but if you want people to drop their real jobs and answer you instantly, you may have to *pay* them. This is a friendly little group (except for me, of course :-) that helps other people when it's convenient. And lots of the group has been at SGF all this week. Please don't treat us like your personal helpdesk. That makes people decide *not* to answer your posts. And putting the word 'urgent' in your message is not going to get me to read SAS-L email any sooner.

>Using Dataset and Not proc SQL 'having min' function

Why not use PROC SQL? Why insist on a DATA step solution?

>I have sas dataset >F1 F2 F3 F4 date >ab ff gg hg 20070505 >ab ff gg jj 20040701 >ab fh ht kkk 20040404 >ab ff gg gggg 20040508 > >I need to have a table with unique records , based on F1, F2, and F3 >field ONLY and keeping one reccord with the earliest date among the >dups > >so the new table will be >F1 F2 F3 F4 date >ab fh ht kkk 20040404 >ab ff gg gggg 20040508 > >thank you!

Consider using some of the SAS tools designed for this. Even without a sorted file, PROC MEANS can do this with a CLASS statement, as long as the cardinality of the {F1, F2, F3} set is not overwhelmingly large.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Mortgage rates near historic lows. Refinance $200,000 loan for as low as $771/month* https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h27f8&disc=y&vers=689&s=4056&p=5117


Back to: Top of message | Previous page | Main SAS-L page