Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with order in WHERE statement
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
![]() |
![]() |