Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases General > Re: "code" tabl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3205 of 3295
Post > Topic >>

Re: "code" tables?

by Ed Prochak <edprochak@[EMAIL PROTECTED] > Jun 27, 2008 at 10:01 AM

On Jun 27, 10:02 am, --CELKO-- <jcelko...@[EMAIL PROTECTED]
> wrote:
> >> When I see SELECT DISTINCT in anything but an ad hoc query, I know
something is wrong with the query. <<

Keep in mind this is in context of someone coming up asking for help
on a query.  DISTINCT would be about the last thing I would add to a
query in that case. I think you understand this, but I say it for the
SQL newbies.
>
> I know what you are saying, but I regard this and a few other things
> as symptoms of bad SQL, not absolute proof of it.  I look for a CROSS
> JOIN that wasn't supposed to be there.  But SELECT DISTINCT can be
> valid.

Agreed. Maybe you can provide an example, but I cannot recall ever
using DISTINCT in a production query.
>
> Other symptoms are the use of ORs when an IN() would work.  Likewise,
> failure to use BETWEEN is another symptom.  These tell me he has not
> un-learned his original procedural language.

Good points Joe. thanks for the follow up.


Ed
 




 1 Posts in Topic:
Re: "code" tables?
Ed Prochak <edprochak@  2008-06-27 10:01:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 9:44:38 CST 2008.