I had a strange problem in one of our production databases. Long story short, simple query:
select id, trunc(stdate) from table_name where trunc(stdate) = '05-FEB-09';
returned no rows. However,
select trunc(stdate) from table_name where id = sought_after_id;
returned '05-FEB-09'
. Only after I tried:
update table_name set stdate = '05-FEB-09' where id = sought_after_id;
my original query worked as expected:
select id, trunc(stdate) from table_name where trunc(stdate) = '05-FEB-09';
> sought_after_id, '05-FEB-09'
So, what was happening with my stdate values?