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 (July 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 22 Jul 2002 10:23:37 -0500
Reply-To:     Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Subject:      Re: merges
Content-Type: text/plain; charset="iso-8859-1"

If it was me, I would consider one of the following alternatives:

A. run PROC TRANSPOSE on the second data set prior to the merge to get all of the physicians into a single column, OR B. use an SQL join instead of a data step merge, i.e.:

proc sql; create table mylib.merged as select * from mylib.table1, mylib.table2 where table1.physno in(table2.physno1,table2.physno2,table2.physno3); quit;

HTH.

Kevin M.

----- Original Message ----- From: "Stacey" <stacey.a.holland@HEALTHPARTNERS.COM> Newsgroups: bit.listserv.sas-l To: <SAS-L@LISTSERV.UGA.EDU> Sent: Monday, July 22, 2002 10:05 AM Subject: merges

> Hi, > > I have 2 datasets that I need to merge but here's the problem: > > One dataset contains a physician number and the other datasets also > contains physician numbers but there are multiple numbers assigned to > each physician(only in the second dataset) Right now the dataset is > laid out with physno1, physno2, physno3 etc all on one record. What I > need to do is if the physician number from dataset1 does not match > with physno1(physician #1) look to see if I can merge it with phys #2 > or phys #3. > > Example > dataset1: dataset #2 > phys # phy#1 phys#2 phys#3 > > 22455 77820 34677 22455 > > I would need to check each phys # field to find if I have a match. > > Any ideas that might work beyond having to merge with each phy # > field? > > Thanks Very Much.


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