| 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 |
|
| 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?
>
|