Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Updating sequences .. WAS ddl plsql can someone spot the error
Jeff Kish wrote:
> Can someone recommend a way to update some sequences via a script?
>
> I have a big set of schemas (how have some sequences that need setting), and I'd like to run a script for each schema
> that
>
> - looks at the max for a table.column
> - sets a sequence number I am using to populate this column to one greater
>
> This is done for a set of about 10 table/sequence number pairs.
>
> I tried plsql, howver I had problems mentioned previously, and I thought maybe I was going through overkill.
>
> Thanks
> Jeff Kish
You must use native dynamic SQL or the DBMS_SQL package. This is DDL and can not be done with static PL/SQL.
Go to http://tahiti.oracle.com and look up "EXECUTE IMMEDIATE."
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Wed May 07 2003 - 00:29:15 CDT
![]() |
![]() |