This will produce next day of the given day from the specified date.
Syntax: next_day (date, day)
Ex:
SQL> select next_day(to_date('24-dec-2006','dd-mon-yyyy'),'sun') from
dual;
NEXT_DAY(
-------------
31-DEC-06
-- If the day
parameter is null then it will display nothing.