Date query .... please help!

From: Ramesh <mesh7_at_ti.com>
Date: Sat, 6 Apr 2002 16:04:13 +0800
Message-ID: <a8m9og$rvf$1_at_tilde.csc.ti.com>


Hai everyone,

I am tring to query within 2 time frame within the same date. I am using ORACLE 8.1.7 running of SOLARIS.

Below are my codes :
SELECT MCNO,SUM(PASSQTY) AS TOTALQTY
FROM TEVENTTRACKPRODHIST
WHERE TO_DATE(substr(STARTTIME,0,15),'DD-Mon-YY HH:MI') >

TO_DATE(substr('04-APR-02 02:50',0,15),'DD-Mon-YY HH:MI')
AND TO_DATE(substr(STARTTIME,0,15),'DD-Mon-YY HH:MI') <
TO_DATE(substr('04-APR-02 10:51',0,15),'DD-Mon-YY HH:MI')
GROUP BY TEAM ORDER BY CATCODE It doesn't seem to work with the same day different time but it works if the date is different.

Could any please advice me.

Thanks & Regards
Ramesh Received on Sat Apr 06 2002 - 10:04:13 CEST

Original text of this message