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 -> DDL in PL/SQL

DDL in PL/SQL

From: Jacek Pichla <jpichla_at_softsystem.pl>
Date: Tue, 18 Jun 2002 16:57:26 +0200
Message-ID: <aenhpf$fe8$1@news2.ipartners.pl>

When I launche below piece of code:

if hasversion = 0 then

    cid := dbms_sql.open_cursor;
   dbms_sql.parse(cid,'alter table fsdbversion add (phrversion number(4) default 0 not null)',dbms_sql.native);

   foo := dbms_sql.execute(cid);
   dbms_sql.close_cursor(cid);

    update fsdbversion set phrversion = 3740; end if;

I got an error:
ORA-06550: line 33, column 27:
PLS-00417: unable to resolve "PHRVERSION" as a column

the same error I have using <<execute immediate>>, ie:

if hasversion = 0 then

    execute immediate 'alter table fsdbversion add (phrversion number(4) default 0 not null)';

    update fsdbversion set phrversion = 3740; end if;

No exception from execute immediate nor dbms_sql.execute(cid) is raised;

Please help me how to create a column and update it in same PL/SQL block.

--
Jacek Pichla
Received on Tue Jun 18 2002 - 09:57:26 CDT

Original text of this message

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