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: How to create indexes in PL/SQL block

Re: How to create indexes in PL/SQL block

From: Mark Membrino <Mark_membrino_spamless_at_biogen.com>
Date: Thu, 5 Aug 1999 10:06:48 -0400
Message-ID: <7oc5q0$pnq$1@epsilon.biogen.com>


DDL functions are not allowed in a PL/SQL block. Try using dynamic sql like the following example.

 1 declare
  2 v_cursor number;
  3 begin
  4 v_cursor := dbms_sql.open_cursor;
  5 dbms_sql.parse (v_cursor, 'create index asdf on test (col1)', DBMS_SQL.V7);
  6 dbms_sql.close_cursor(v_cursor);
  7* end;

Iiro Heiniö <iiro.heinio_at_future121.com> wrote in message news:5heq3.108$Vm6.13_at_read2.inet.fi...
> Hi!!!
>
> I have a problem with PL/SQL.
> I need to create different indexes for temporary table depending
> on the parameters used to start the PL/SQL block.
> I'm using Server 7.3.3
>
> Thanks in advance
>
>
Received on Thu Aug 05 1999 - 09:06:48 CDT

Original text of this message

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