Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Order of where clause matters!

Order of where clause matters!

From: Steve Haynes <steve_at_rwx777.demon.co.uk>
Date: 2000/05/26
Message-ID: <jsQodJAWNrL5EwSU@rwx777.demon.co.uk>#1/1

Hi All,

RE: 8.0.5.1.1 on NT4.

I have a strange problem with a divide
by zero error...

select whatever
from my_table
where stuff /* stuff that means "col_a" is never 0 */ and col_b/col_a > 10;

This gave me a divide by zero error...
I then changed the order of the where clauses so that "and col_b/col_a > 10" was first after the "where" keyword and the error went away.

I then added an index and the error came back. Drop the index, error goes away.

This is a new one on me. Two issues here, one is the order of the where clause, and one is the existence of the index (altering the plan).

Is there a way I can predict this behaviour?

I need the index but I don't need the error!

Thanks,

Steve Received on Fri May 26 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US