Incrementing a date variable
424486Jul 29 2004 — edited Jul 30 2004Hi everyone,
How can we increment a date variable in a PL/SQL stored procedure. I need to loop through a pair of date using WHILE loop. I'm using following statement:
emp_leave_from_date := emp_leave_from_date + 1;
But its giving me the following error:
Compilation errors for FUNCTION UNILEVER.RET_NO_OF_DAYS
Error: PLS-00403: expression 'EMP_LEAVE_FROM_DATE' cannot be used as an INTO-target of a SELECT/FETCH statement
Line: 11
Text: select emp_leave_from_date + 1 into emp_leave_from_date from dual;
I even tried following statement but no success:
select emp_leave_from_date + 1 into emp_leave_from_date from dual;
Any help would b highly appreciated. Shall I use some other loop construct?
Thx.