Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: procedure and ddl commands?
I will explain why I need that in procedure
I need to change working server for small but important aplication in
posible problem period with working server.
I have same tables on these servers, but don't have indexes and right
sequences, which gave me next number for application on used tables.
I tryed with 'execute immediate' but didnt do that in right way
this is problem
Procedure PRTEST1
( )
IS
nNewSNo number;
BEGIN
CREATE INDEX testind1
ON testtable1
( SNo );
SELECT max(SNo)+1 INTO nNewSNo FROM testtable1;
EXECUTE IMMEDIATE 'CREATE CREATE SEQUENCE testsequence
INCREMENT BY 1
START WITH nNewSNo
MINVALUE 1
MAXVALUE 999999
CYCLE
NOORDER
NOCACHE';
EXCEPTION
END;
where I use in application 'testsequence' for 'SNo' in 'testtable1'
Received on Tue Jul 27 2004 - 08:02:51 CDT