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 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 12 Feb 2001 15:26:56 -0800
Reply-To:   gwarnick@fhcrc.org
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   greg warnick <gwarnick@SNAP.FHCRC.ORG>
Organization:   Fred Hutchinson Cancer Research Center
Subject:   Re: Merging "unrelated" records
Content-Type:   text/plain; charset=us-ascii

try proc sql using a cross join

Andreas De Troy wrote:

> Hi, > > I have the following problem: > > I have 2 datasets, > > -one with (unique) ID's, like: > "A5001" > "A5003" > "A5114" > ... > -and one with a variable number of types, like: > "type 1" > "type 2" > "type 3" > (could be two different types, could be one, could be three or four... this > is variable) > > Now I want to combine them, so that every ID is merged with all of the types > available. The resulting dataset should look like: > "A5001" "type 1" > "A5001" "type 2" > "A5001" "type 3" > "A5003" "type 1" > "A5003" "type 2" > "A5003" "type 3" > "A5114" "type 1" > etc. > > Is there any general way to do this, considering that the number of types is > not fixed? I think this is a simple problem, yet I cannot find a solution - > I don't see how a merge could be performed here. Anyone able to help? > > Thanks in advance, > > Andreas.


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