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 (September 2011, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 30 Sep 2011 16:38:43 -0700
Reply-To:   Fareeza Khurshed <fkhurshed@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Fareeza Khurshed <fkhurshed@GMAIL.COM>
Subject:   Re: Interleaving unrelated datasets
Comments:   To: Bruce Johnson <chimanbjsas@gmail.com>
In-Reply-To:   <CALYu8eE=gUaMr8GG0bnSjDavSOcq5XZaYWXTJKX7yq_3evAjow@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

You're looking for whats called a cross join. Tom's code works, the following works as well.

proc sql; create table want as select * from have1 CROSS JOIN have2; quit;

On Fri, Sep 30, 2011 at 4:21 PM, Bruce Johnson <chimanbjsas@gmail.com>wrote:

> I have a situation that I cannot figure out how to resolve... > > I have two datasets. One has a field called svcarea. The other table has > a > field called prodline. The tables look something like this: > > Table One: > NORTH > SOUTH > EAST > WEST > > Table Two: > SURGICAL > MEDICAL > > What I am trying to get is a table that looks like this: > > Table Three: > NORTH SURGICAL > NORTH MEDICAL > SOUTH SURGICAL > SOUTH MEDICAL > EAST SURGICAL > EAST MEDICAL > WEST SURGICAL > WEST MEDICAL > > Is this possible? >


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