Date: Thu, 19 Dec 2002 16:59:04 -0500
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: SQL For Smarties
Content-Type: text/plain; charset="gb2312"
The latter ( a in ... AND b in ...).
Sig
-----Original Message-----
From: Johnson Chang [mailto:jchangmail@YAHOO.COM]
Sent: Wednesday, December 18, 2002 8:53 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SQL For Smarties
> I sure wish SAS would add the ability to say
>
> select a, b, c
> from x
> where (a, b) in (select a, b from z);
what means this code?
proc sql;
select a, b, c
from x
where a in (select a from z) or
b in (select b from z);
OR
select a, b, c
from x
where a in (select a from z) and
b in (select b from z);
run;
J Chang
_________________________________________________________
Do You Yahoo!?
"您想享受2-7折星级酒店价格吗?"
http://cn.travel.yahoo.com/
|