| Date: | Mon, 1 Jul 2002 15:25:46 -0400 |
| Reply-To: | "Delaney, Kevin P." <khd8@CDC.GOV> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Delaney, Kevin P." <khd8@CDC.GOV> |
| Subject: | Sql v. datastep |
| Content-Type: | text/plain; charset="ISO-8859-1" |
|---|
Maybe its cause it's a Monday, but I can't figure out how to replicate the
data step below as Sql code:
Data both ina inb;
Merge a (in=a) b(in=b);
By id;
If a and b the output both;
Else if a and ^b then output ina;
Else if ^a and b then output inb;
Run;
I can get the dataset both in Sql as:
Proc sql;
Create table both as
Select a.*,b.*
From a as a inner join b as b
On a.id=b.id;
Order by id;
Quit;
But getting the obs only in A and those only in b is escaping me...
Thanks again,
Kevin Delaney
KDelaney@cdc.gov
|