Date: Mon, 5 Apr 2010 09:07:11 -0700
Reply-To: Sterling Paramore <gnilrets@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sterling Paramore <gnilrets@GMAIL.COM>
Subject: Re: exclude record from another table
In-Reply-To: <o2k6716d5d1004050819wf397f34x2a4616958c54ea2d@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
The datastep solution uses the "IN" operator in a merge:
data t1notint2;
merge t1 (in = int1) t2 (in = int2);
by a b c;
if int1 and not int2 then output;
run;
On Mon, Apr 5, 2010 at 8:19 AM, Jeff <zhujp98@gmail.com> wrote:
> data t1;
> input a b c;
> cards;
> 1 2 3
> 2 3 6
> 7 8 9
> 10 3 2
> ;
> run;
>
> data t2;
> input a b c;
> cards;
> 1 2 3
> 2 3 6
> 9 8 3
> ;
> run;
> i want all record in t1 but not in t2.
> 7 8 9
> 10 3 2
> In this case.
> How can I do that?
> Thanks,
> Jeff
>
|