|
Hi Tammy,
A non-SQL solution:
DATA Table_A;
INPUT Name $ Date;
CARDS;
Tim 01
Tim 02
Tim 03
Mary 01
Mary 02
Mary 03
Mary 04
;
RUN;
DATA Table_B;
INPUT Name $ Date;
CARDS;
Tim 03
Mary 03
Mary 04
;
RUN;
PROC SORT DATA=Table_A; BY Name Date; RUN;
PROC SORT DATA=Table_B; BY Name Date; RUN;
DATA Table_A_no_B;
MERGE Table_A (IN=A) Table_B (IN=B);
BY Name Date;
IF (NOT B);
RUN;
PROC PRINT DATA=Table_A_no_B; RUN;
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
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
|