Quote:
Originally posted by CKENTEBE
I hope someone can help me here.
--
I have a field in the procedure that should start from 1 at the start of the year. At the end of the year, I want to drop the sequence.
I have to execute the procedure for records every year from 1996 to 2002.
create sequence
procedure(year)
drop sequence
I would appreciate any help here.
Thanks in advance
|
BEGIN
EXECUTE IMMEDIATE 'CREATE SEQUENCE myseq';
procedure(year)
EXECUTE IMMEDIATE 'DROP SEQUENCE myseq';
END;
/
Note that the sequence must exist when you create the procedure, otherwise it won't compile (unless you are using dynamic SQL to select).