Home » SQL & PL/SQL » SQL & PL/SQL » help with PLS-00357 error:
help with PLS-00357 error: [message #37543] Wed, 13 February 2002 14:40 Go to next message
Lance Pris
Messages: 40
Registered: January 2002
Member
I am useing the following statment 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

Thank you in advance.

Lance
PLS-00357 error:able,View Or Sequence reference not allowed in this context [message #37544 is a reply to message #37543] Wed, 13 February 2002 14:44 Go to previous messageGo to next message
Lance Pris
Messages: 40
Registered: January 2002
Member
True error message
Re: help with PLS-00357 error: [message #37545 is a reply to message #37543] Wed, 13 February 2002 15:25 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Don't you want to replace this:

dbms_sql.parse (cursor_id,'TRUNCATE TABLE '||UPPER(PRIMUS_TEMP_DUMP),dbms_sql.v7);


with this?

dbms_sql.parse (cursor_id,'TRUNCATE TABLE '||UPPER(in_tab_name),dbms_sql.v7);


After this change, the procedure works for me (although on 8.1.7).
Previous Topic: How to calculate the difference between dates on different rows
Next Topic: sql statement
Goto Forum:
  


Current Time: Fri Apr 26 05:25:03 CDT 2024