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

Home -> Community -> Usenet -> c.d.o.server -> Re: procedure and ddl commands?

Re: procedure and ddl commands?

From: dead <OVOIZBACI-vlasic_at_vodatel.net>
Date: Tue, 27 Jul 2004 15:02:51 +0200
Message-ID: <ce5jpt$ha5$1@sunce.iskon.hr>


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

Original text of this message

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