i have a oracle query where I have given multiple parameters for date range and its working if a specific range is given or if it is empty but the problem is when I have sysdate given I want to display all records it should ignore the date range
this is what I tried
Select hiredate,employee
from emp where deptno = 10
AND hiredate BETWEEN NVL ( : p_Date_from, TO_DATE ('01.01.2000', 'dd.mm.yyyy'))
AND NVL ( : p_Date_to, SYSDATE + 1)
so if sysdate is present in : p_Date_from and : p_Date_to I want to see whole record where deptn=10.