Date: Tue, 5 Apr 2005 08:12:33 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: awkward code
Quickness and accuracy are competing ends of the programming continuum. I
suggest that most code lies somewhere in the middle.
I wish I could go to SUGI and see all you guys. Alas, I'll wait until it's
here in CA.
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of toby
dunn
Sent: Tuesday, April 05, 2005 8:04 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: awkward code
Ian ,
I did say it was untested... but your right acurate is better than fast
which I seem to miss more than I care to admit. Guess I have something to
work on...
In any event I was unsure how SQL would treat the statement ID and w not in
(select.....). Looks like it treats it differently than I had hoped. It is
more like where ID is not missing or '0' and w not in the list from the
select statement.
Thanks ,
Toby Dunn
P.S. I also look forward to meeting you at SUGI and hearing your
presentation on Macro Debuging.
From: Ian Whitlock <iw1junk@COMCAST.NET>
Reply-To: iw1junk@COMCAST.NET
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: awkward code
Date: Tue, 5 Apr 2005 14:33:20 +0000
Toby,
You seem to be missing one important ingredient in your
programming career. Take a hint from Wyatt Earp,
"Fast is fine, but accuracy is everything."
Here is some code to test with
data ret ;
do w = 0 to 2 ;
do id = 0 to 3 ;
output ;
end ;
end ;
run ;
data d1 ;
a = 1 ;
run ;
proc sql ;
select *
from ret
where ID and w not in (select a from d1) ;
quit ;
The code executes without error. Do you know why?
Looking forward to seeing you at SUGI. Promise, I won't kick.
Ian
Jianping,
Assuming the code does what you want, the only thing that looks
awkward to me is the names you have chosen.
Ian Whitlock
===================
Date: Tue, 5 Apr 2005 13:39:54 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion"
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: awkward code
Comments: To: zhujp98@gmail.com
In-Reply-To: <6716d5d05040420533d6aaadc@mail.gmail.com>
Content-Type: text/plain; format=flowed
Jainping,
Not sure if this will work its untested but:
proc sql ;
select *
from ret
where ID and w not in (select a from d1) ;
quit ;
Toby Dunn
From: Jianping Zhu <zhujp98@GMAIL.COM>
Reply-To: Jianping Zhu <zhujp98@gmail.com>
To: SAS-L
Subject: awkward code
Date: Mon, 4 Apr 2005 23:53:48 -0400
proc sql;
create table new as
select * from ret
where id not in
(
select a from d1
) and w not in
(
select a from d1
)
;
quit;
This code looks awkward, is there a way to simlify it?
Thx.