NVL different output based on bound type
Hello Folks,
I have a question related to NVL function output based on the type of the value bound.
It returns different output based on the the type of the bind variable when the value of the variable is NULL.
I have the following query.
SELECT NVL(:bind_var, TO_DATE('9998/12/31', 'yyyy/mm/dd')) from dual
- Scenario 1: bind_var is STRING & it's value is NULL
Output - 31-DEC-98
- Scenario 2: bind_var is DATE & it's value is NULL
Output - 12/31/9998
Note that NLS_DATE_FORMAT is DD-MON-RR.
Any thoughts why I'm having this different behavior?
Thank You
Navinth