Re: Which of the two statements do you find is easier to understand?
- From: Jared Still <jkstill@xxxxxxxxx>
- To: rjoralist2@xxxxxxxxxxxxxxxxxxxxx
- Date: Fri, 6 May 2011 11:46:12 -0700
On Fri, May 6, 2011 at 11:08 AM, Rich Jesse < rjoralist2@xxxxxxxxxxxxxxxxxxxxx> wrote: > 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. > > Agreed. One would hope this is SQL that is run infrequently... Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com
- Follow-Ups:
- Re: Which of the two statements do you find is easier to understand?
- From: Michael Moore
- Re: Which of the two statements do you find is easier to understand?
- References:
- Which of the two statements do you find is easier to understand?
- From: Michael Moore
- Re: Which of the two statements do you find is easier to understand?
- From: Rich Jesse
- Which of the two statements do you find is easier to understand?
Other related posts:
- » Which of the two statements do you find is easier to understand? - Michael Moore
- » Re: Which of the two statements do you find is easier to understand? - Rich Jesse
- » Re: Which of the two statements do you find is easier to understand? - Niall Litchfield
- » Re: Which of the two statements do you find is easier to understand? - Alex List
- » Re: Which of the two statements do you find is easier to understand? - Jared Still
- » Re: Which of the two statements do you find is easier to understand? - Michael Moore
- » Re: Which of the two statements do you find is easier to understand? - Rumpi Gravenstein