I am using a query where i am trying to get the result where the datecolumn>='Fromdate' and datecolum<=ToDate'.
cc.col2 AS Description
FROM table1 cc,
WHERE cc.date>=(SELECT DISTINCT
WHEN :F1 IS NULL
THEN sysdate - 60
WHEN :F2 IS NULL
Here F1 is From Date i.e. '1-MAR-2011' and F2 is ToDate i.e. '17-MAR-2011'
here I am not getting the records which are in the date of 17 th march 2011.
If I change the date to '18-MAR-2011' then I am getting the records on 17th march.
Is there any thing worng with the query?
Expectation is as I am using <='17-MAR-2011', I need to get the result of 17 March also.