Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> 'alter sequence' in a PL/SQL procedure?! (!@#$%^&*)

'alter sequence' in a PL/SQL procedure?! (!@#$%^&*)

From: Kenn Herman <kennh_at_sierra.com>
Date: 1997/07/14
Message-ID: <Pine.GSO.3.96.970714170306.11495E-100000@rintintin>#1/1

I have been trying to have a procedure alter a sequence in a procedure, but to no avail. I receive the following error:

LINE/COL ERROR

-------- -----------------------------------------------------------------
4/7      PLS-00103: Encountered the symbol "ALTER" when expecting one of
         the following:
         begin declare exit for goto if loop mod null pragma raise
         return select update while <an identifier>
         <a double-quoted delimited-identifier> etc.




When i try and do the following:

create or replace procedure restart_seq (start_val in number) as
  begin

      alter sequence the_seq minvalue start_val cycle; end;

Why will PL/SQL not allow me to alter a sequence? To test it I ran it on the sqlplus command line, and also tried to do a drop and then recreate the sequence, but it barfed on the DROP.

Any suggestions?

Kenn Herman
Assistant Technical Webmaster
Sierra On-Line



When kids where asked about love....
"Don't do things like have smelly, green sneakers. You might get

   attention, but attention ain't the same thing as love."

                                     Alonzo, age 9

----------------------------------------------------------------------
Received on Mon Jul 14 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US