Re: Which of the two statements do you find is easier to understand?

From: Rich Jesse <rjoralist2_at_society.servebeer.com>
Date: Fri, 6 May 2011 13:08:40 -0500 (CDT)
Message-ID: <b87b92d31280e69b2a6138aab97b8826.squirrel_at_society.servebeer.com>



Michael writes:

> Which of the two statements do you find is easier to understand?
>
> WHERE (txv.business_unit2tcode NOT IN (41940)
> OR (txv.business_unit2tcode IN (41940) AND txv.ext_source_key IS
> NULL));
I'll take what's behind Door #3:

    WHERE txv.business_unit2tcode != 41940 OR txv.ext_source_key IS NULL;

Simple, to the point, and logically equivalent to your first WHERE clause.

Your second one gave me a headache. Just sayin'...

Rich

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 06 2011 - 13:08:40 CDT

Original text of this message