Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> compare round(date)s
Hi,
I a puzzled by behavior of my Oracle 8.0.4.
I have table with field DATE field axtime. Here are two queries that return different results:
SQL> select count(*) from atable partition(PART19991121)
2 where round(axtime) <
round(to_date('1999/11/22','YYYY/MM/DD'));
COUNT(*)
9648
SQL> select count(*) from atable where axtime < round(to_date('1999/11/22','YYYY/MM/DD'));
COUNT(*)
53565
What makes these two queries to return different counts?
Here is my sessions' setting for date:
SQL> select round(to_date('1999/11/22','YYYY/MM/DD')) from dual;
ROUND(TO_DATE('1999/
As far as I can see, round() works as I would expect making the date at 0 am.
Any suggestion will be appreciated. David.
--
--
David Zlotchenko
E-mail: zlotchen_at_cs.utk.edu
WWW: http://www.oars.utk.edu/~zlotchen
Received on Sun Dec 26 1999 - 09:43:09 CST
![]() |
![]() |