Date: Wed, 22 Oct 2008 22:36:40 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Table A exclude data in table B
proc sql;
create table a_butnot_b as
select name,date
from a
except
select name,date
from b
;
On Wed, 22 Oct 2008 19:12:02 -0700, tammy1207@YAHOO.COM.TW wrote:
>Hello everyone,
>
>In table A, it contains entire data of Name and Date. In table B, it
>lists the Name and Date which are supposed to removed from table A.
>How can I use proc sql or other ways to do the join in order to
>eliminate the list in table B?
>
>Sample:
>
>Table A
>
>Name Date
>Tim 01
>Tim 02
>Tim 03
>Mary 01
>Mary 02
>Mary 03
>Mary 04
>
>
>Table B
>
>Name Date
>Tim 03
>Mary 03
>Mary 04
>
>
>Desire final table
>
>Name Date
>Tim 01
>Tim 02
>Mary 01
>Mary 02
>
>I appriciate any assistance you can lend.
>
>Tammy
|