Re: Do all the legs of an "OR" with null comparisons get executed?
- From: "Shakespeare" <whatsin@xxxxxxxxx>
- Date: Sat, 29 Mar 2008 13:14:55 +0100
"Arthernan" <arthernan@xxxxxxxxxxx> schreef in bericht
news:e65e3d5b-d8be-4dec-a1fa-8c17a1e89bf2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 28, 11:41 am, "fitzjarr...@xxxxxxx" <fitzjarr...@xxxxxxx>
wrote:
That is an alternative. I do think the logic is correct thought. Take
the first comparison for example:
UPP_FIRST='JOHN' and UPP_LAST='SMITH' and MMDDOB=NULL and AA=1
I do not want to get any rows back if MMDDOB was NULL. In this case I
In that case you should use
WHERE MMDDOB is not NULL and (--- rest of your conditions).
MMDDOB = NULL is ALWAYS false (or actually undefined but not true) so these
clauses dont need to be calculated. You could replace the whole part with
"0=1"
want Oracle to skip that comparison at execution. And it does do that
when it is not parametized. I just don't know if it will when I
parametize it.
The code is very simple and straight forward as it is. And I do
believe it is also correct.
No it's not, comparing with '=NULL' id definitely wrong.
I don't want to make it complicated if it
not necessary.
But you already did.
Arturo Hernandez
Shakespeare
.
- Follow-Ups:
- References:
- Do all the legs of an "OR" with null comparisons get executed?
- From: Arthernan
- Re: Do all the legs of an "OR" with null comparisons get executed?
- From: fitzjarrell@xxxxxxx
- Re: Do all the legs of an "OR" with null comparisons get executed?
- From: Arthernan
- Do all the legs of an "OR" with null comparisons get executed?
- Prev by Date: Re: help!! how to call pl/sql anonymous block from java?
- Next by Date: Re: any info on dates when oracle 11g patchset may be arriving?
- Previous by thread: Re: Do all the legs of an "OR" with null comparisons get executed?
- Next by thread: Re: Do all the legs of an "OR" with null comparisons get executed?
- Index(es):
Relevant Pages
|