Guest_imported
New member
- Jan 1, 1970
- 0
Using 8i... My stor proc requires alternative Cursor declarations based on the value of a variable e.g.
'
'
if inp_var = 1 then
DECLARE CURSOR myCur IS
Select....From TableA Where ...;
elsif inp_var = 2 then
DECLARE CURSOR myCur IS
Select....From TableB Where ...;
elsif inp_var = 3 then
DECLARE CURSOR myCur IS
Select....From TableC Where ...;
End if;
'
'
I am having problems embedding a DECLARE CURSOR
in an IF...ELSIF statement. Any ideas, anyone?
'
'
if inp_var = 1 then
DECLARE CURSOR myCur IS
Select....From TableA Where ...;
elsif inp_var = 2 then
DECLARE CURSOR myCur IS
Select....From TableB Where ...;
elsif inp_var = 3 then
DECLARE CURSOR myCur IS
Select....From TableC Where ...;
End if;
'
'
I am having problems embedding a DECLARE CURSOR
in an IF...ELSIF statement. Any ideas, anyone?