We have a query (please don't ask me why it is written this way)
--Doesn't work:
select ea1.ep_number, ea1.est_dt, veas.est_dt
from (select a.ep_number, ea.est_dt
from v_episode_avail_summary_break a, episode_airings ea
where a.ep_number = ea.ep_number
and ea.est_dt between '20-Dec-02' and '01-Jan-03'
group by a.ep_number, ea.est_dt) veas,
episode_airings ea1
where veas.ep_number = ea1.ep_number
and ea1.est_dt between '20-Dec-02' and '01-Jan-03'
vs.
--Works:
select ea1.ep_number, ea1.est_dt, veas.est_dt
from (select a.ep_number, ea.est_dt
from v_episode_avail_summary_break a, episode_airings ea
where a.ep_number = ea.ep_number
and ea.est_dt between '20-Dec-02' and '01-Jan-03'
group by a.ep_number, ea.est_dt) veas,
episode_airings ea1
where veas.ep_number = ea1.ep_number
and ea1.est_dt between trunc(to_date('20-Dec-02','DD-Mon-YY'))
and trunc(to_date('01-Jan-03','DD-Mon-YY'))
Also if we comment "and ea1.est_dt between '20-Dec-02' and '01-Jan-03'" the non-working query runs fine.
Does anyone know what could be wrong? The est_dt is a date column. This is 9201 ...
Raj
______________________________________________________
Rajendra Jamadagni MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.
QOTD: Any clod can have facts, but having an opinion is an art!
********************************************************************This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.*********************************************************************2