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: pl/sql error utilizing dynamic sql

Re: pl/sql error utilizing dynamic sql

From: Gocha Mchedlishvili <gocham_at_mci2000.com>
Date: Wed, 10 Feb 1999 04:07:13 GMT
Message-ID: <RB7w2.229$mB5.7536@news.cwix.com>


I would check if DBMS_SQL package is installed

Gocha

Stephen wrote in message <79qdhs$gpa_at_tuna.eky.com>...
>am getting error on the below code.
>
>here are the errors:
>
>pls-00201 identifier 'dbms_sql.open_cursor' must be declared
>pls-00201 identifier 'dbms_sql.execute' must be declared
>
>code:
>
>procedure itable_proc
>AS
> begin
> declare
> vname varchar2(8);
> RESULT suser_t.mailerplanetcode%type;
> RESULT2 suser_t.mailerplanetcode%type;
> cursor c1 is
> select mailerplanetcode as plcde, mailerplanetcode from
> suser_t;
> procedure execute_immediate( sql_stmt in varchar2 )
> as
> exec_cursor integer default dbms_sql.open_cursor;
> rows_processed number default 0;
> begin
> dbms_sql.parse(exec_cursor, sql_stmt, dbms_sql.native );
> rows_processed := dbms_sql.execute(exec_cursor);
> dbms_sql.close_cursor( exec_cursor );
> end;
> begin
> for i in c1 loop
> RESULT := i.plcde;
> vname := 'T'||RESULT||'_T';
> RESULT2 := i.mailerplanetcode;
> execute_immediate( 'insert into ' || vname || '
>
> scf,postal_oper_num,read_date,planetcode,postnet_zipcode,table_date)
> select
>scf,postal_oper_num,read_date,planetcode,postnet_zipcode,sysdate
> from ext_report_t
> where substr(planetcode,3,5) = ''' || RESULT2 ||
>''''
> );
> end loop;
> end;
> end itable_proc;
>
>
>
>--
>
>
>Stephen E. Poff
>poffs_at_tteam.com
>
>
>
>
Received on Tue Feb 09 1999 - 22:07:13 CST

Original text of this message

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