I am working in Oracle 10g XE. I am having Two databases inside by Oracle SQL Developer. I am executing this Query..
SELECT SCHEDULE_ID, START_DATE, END_DATE
FROM SCHEDULE
WHERE C_ID IN (5781)
AND START_DATE >=TO_DATE ('1/29/2012','MM/DD/YYYY')
AND END_DATE <=TO_DATE ('4/14/2012','MM/DD/YYYY')
In First Database, the data returned correctly. I am executing the same Query in the Second Database, but it does not returns any values. But the data is available in table.
I had executed the query
SELECT dump(START_DATE), dump(END_DATE) FROM SCHEDULE WHERE C_ID=5026
I am getting the result as,
DUMP(START_DATE ) -> Typ=12 Len=7: 100,112,2,7,1,1,1
DUMP(END_DATE) -> Typ=12 Len=7: 100,112,2,13,1,1,1
and an important thing is, i should not modify the query..Because its working in all the other databases...
C_ID IN (5781)in the WHERE clause. Try executing the following:SELECT * FROM TABLE WHERE C_ID=5781. Does that row have a date in the appropriate range?DATE, right ?