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 (July 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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; Order by id; Quit;

But getting the obs only in A and those only in b is escaping me...

Thanks again,

Kevin Delaney

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