Title: RE: PLEASE HELP WITH STATEMENT.

If primus_temp_dump is an Oracle table name, then you would just say
dbms_sql.parse (cursor_id, 'TRUNCATE TABLE PRIMUS_TEMP_DUMP', dbms_sql.native) ;

If primus_temp_dump is a PL/SQL variable, you would want to declare it in your procedure, and then your statement would be correct.

> -----Original Message-----
> From: Lance Prais [mailto:[EMAIL PROTECTED]]
>
> I am using the following statement in Oracle 8.0.6 and
> getting an error I
> and I do not understand why it is giving it to me.
>
> CODE:
> CREATE OR REPLACE procedure primus_temp_dump_test(in_tab_name
> in varchar2)
> as
> cursor_id integer;
> execute_return_value integer;
> last_function_code integer;
>
> Begin
>
> cursor_id := dbms_sql.open_cursor;
> dbms_sql.parse (cursor_id,'TRUNCATE TABLE
> '||UPPER(PRIMUS_TEMP_DUMP),dbms_sql.v7);
> execute_return_value := dbms_sql.execute(cursor_id);
> last_function_code := dbms_sql.last_sql_function_code;
> dbms_sql.close_cursor(cursor_id);
>
> End;
> /
>
> Error:
>                             *
> ERROR at line 1:
> ORA-06550: line 1, column 29:
> PLS-00357: Table,View Or Sequence reference
> 'PRIMUS_TEMP_DUMP' not allowed
> in
> this context
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored

Reply via email to