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 (May 1996, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 16 May 1996 11:33:10 -0700
Reply-To:     WHITE TRASH <gimme@A.BEER>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         WHITE TRASH <gimme@A.BEER>
Organization: Trailer Park USA
Subject:      Many to many merge, i.e. products is it possible?

I want to put data sets togather using a product of the by variable.

For example given the following datasets:

dataset test1: name var1 john 1 john 2 bill 1 bill 2 bill 3 dave 1

and dataset test2: name var2 john 1 john 2 bill 1 dave 1

if I use a merge statement with a by name (after sorting of course) I get

name var1 var2 bill 1 1 bill 2 1 bill 3 1 dave 1 1 john 1 1 john 2 2

Exactly what merge says it does. but here's what I really want to get is dataset like the following:

name var1 var2 bill 1 1 bill 2 1 bill 3 1 dave 1 1 john 1 1 john 1 2 john 2 1 john 2 2

Here the john's came out more like a product than a merge. Is there a nice way to handle this? Any help is welcomed.

Thanks in Advance,

Rob


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