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

Home -> Community -> Usenet -> c.d.o.misc -> Problem with order in WHERE statement

Problem with order in WHERE statement

From: Thomas Drolshagen <tdrolshagen_at_scope.ch>
Date: 1998/03/03
Message-ID: <6dgstm$gl8$1@news.imp.ch>#1/1

Hi
I have a SELECT statement with a strange behaviour when changing the order of the conditions in the WHERE statement.

When doing the SELECT as listed below I won't get the record I'm looking for:
SELECT * FROM view WHERE id = 5 AND TST_EQUAL(tst, to_date('25-02-1998 18:13:19', 'DD-MM-YYYY HH24:MI:SS')) = 0 When changing the order in the WHERE statement the SELECT returns the correct record:
SELECT * FROM view WHERE TST_EQUAL(tst, to_date('25-02-1998 18:13:19', 'DD-MM-YYYY HH24:MI:SS')) = 0 AND id = 5

TST_EQUAL is a function that returns 0 when both timestamps are equal.

Is there anybody having an explanation for this strange behaviour ?

Thomas Received on Tue Mar 03 1998 - 00:00:00 CST

Original text of this message

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