Date Comparison Doesn't Work -
08-06-2003
, 12:09 AM
I've inherited Oracle RDB7 foe OpenVMS - not very knowledgeable on either.
I've been struggling with this for a week.
I'm running the following SQL script
set default date format 'SQL92';
select min(cast(t_most as date)), max(cast(t_most as date))
from idi_msg_rec
where t_moad_address = ''P1' or t_mrad_address = ''P1'
and (cast(current_date as date)) = (cast(t_most as date))
;
The output is
2003-07-30 2003-08-05
The t-most column is type TIMESTAMP.
Today is 2003-08-06 so why don't I get 0 rows?
If I leave out the finial condition I get exactly the same
result.
Why does this date comparison not work?
Thanks in advance for any help |