Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> sequence name as a variable
Hello,
I was wondering if I can use sequence name as a variable in a
function. I want to pass the seq. name as a input parameter to a
function. Lets say :
CREATE FUNCTION test_func
(seq_name varchar2)
return number;
IS
temp_value number;
BEGIN
select seq_name.nextval into temp_value from dual;
return temp_value;
END;
/
When I execute this function, am getting an error saying "Invalid reference to variable 'SEQ_NAME' "
So, my Question is how do I pass the name of seq. as parameter and get the next value of the sequence ?
Thanks
-Sravan
Received on Thu Oct 18 2001 - 19:33:07 CDT
![]() |
![]() |