Hi,
I need to use decode condition in where clause in such a way that if the respective column is null then consider the corresponding column
for eg
Fee_date | Fee_refund_date |
10-OCT-05 | |
12-NOV-05 | |
| 11-JAN-06 |
| 16-FEB-06 |
i have a query in place like below where p_fee_flag will be passed as either FEE or null i need to check another condition like if p_fee_flag is null then fee_date should be null when comparing fee_refund_date between TRUNC(BKT.ACT_START_DATE) AND TRUNC(BKT.ACT_END_DATE
SELECT 1
FROM BUCKET BKT
WHERE DECODE(P_FEE_FLAG,'FEE',TRUNC(FS.FEE_DATE),TRUNC(FS.FEE_REFUND_DATE))
BETWEEN TRUNC(BKT.ACT_START_DATE) AND TRUNC(BKT.ACT_END_DATE)