LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 Feb 2004 16:27:29 +1100
Reply-To:     Philip_Crane@WORKCOVER.VIC.GOV.AU
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Philip_Crane@WORKCOVER.VIC.GOV.AU
Subject:      Re: Picking Common records
Comments: To: Maand M <maand_n_dune@YAHOO.COM>
Content-type: text/plain; charset="us-ascii"

Maand

SQL is probably the easiest way to tackle your request.

proc sql; create table dataset3 as select a.id, a.var1, a.var2, a.var3 from dataset1 a, dataset2 b where a.id = b.id ; quit;

Hope this gets you underway.

Philip

Maand M <maand_n_dune@YAH To: SAS-L@LISTSERV.UGA.EDU OO.COM> cc: Sent by: "SAS(r) Subject: Picking Common records Discussion" <SAS-L@LISTSERV.U GA.EDU>

09/02/2004 03:46 PM Please respond to Maand M

Hi, I have different datasets from which I need to pick common records (ie on common ID variable)

The Data set looks something like this

Dataset a

id var1 var2 var3 10 a 4 6 12 t 5 9 14 p 1 0 16 h 5 8 17 u 12 6

Dataset b

id var1 var2 var3 9 a 5 16 11 f 12 8 14 p 1 0 16 h 5 8 21 d 9 9

so the common records will be

id var1 var2 var3 14 p 1 0 16 h 5 8

Can someone please help me

Thanks

Maand

__________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html


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