![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Guys , I have to create a procedure which has a cursor declared inside as : Declare c_1 cursor for select name,dept,sal,desig from employee where join_date < ( current timestamp - 100 days); Is it possible to pass the value 100 at the run time ? I m stuck with the correct syntax to do it but of no avail . I have tried : Declare c_1 cursor for select name,dept,sal,desig from employee where join_date < ( current timestamp ||'-'||p_number||' days)'; where p_number is an IN variable of int type. But its not working . Please excuse my ignorance as I m new to db2 . Thanks . Have you tried the obvious? |
![]() |
| Thread Tools | |
| Display Modes | |
| |