PL/SQL (MOSC)

MOSC Banner

pl sql block error while prepare sql statement

edited Sep 6, 2013 6:35AM in PL/SQL (MOSC) 1 commentAnswered
I written following block in unix .sh file. to pass some variable from unix to oracle.  but I am facing the below error. please help.


                sqmt_alter := 'alter table ' || MYTABLE2 || ' drop (' || ID || ')';
                                                *
ERROR at line 29:
ORA-06550: line 29, column 35:
PLS-00357: Table,View Or Sequence reference 'MYTABLE2' not allowed in this
context
ORA-06550: line 29, column 3:
PL/SQL: Statement ignored
ORA-06550: line 31, column 50:
PLS-00357: Table,View Or Sequence reference 'MYTABLE2' not allowed in this
context
ORA-06550: line 31, column 17:
PL/SQL: Statement ignored




 DECLARE
   my_DATA $TABLE_NAME.$COLUMN_NAME%TYPE;
   CURSOR c1 IS SELECT $COLUMN_NAME  from $TABLE_NAME for update of $mig_column;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center