Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

creating trigger with dbms_sql causes ORA-01912

herzalAug 19 2009 — edited Aug 19 2009
I use the following procedure to execute statements that are stored in clobs. These statements are very long 'create trigger' statements.
SQL> create or replace procedure executeClob(clob_stmt in clob) is
  2  
  3      n_size number := ceil(dbms_lob.getlength(clob_stmt) / 255);
  4      n_counter number;
  5      
  6      t_lines dbms_sql.varchar2s; 
  7      i_cursor integer := dbms_sql.open_cursor;
  8  begin
  9   
 10      for n_counter in 1..n_size loop
 11          t_lines (n_counter) := to_char(substr(clob_stmt, 1 + 255 * (n_counter - 1), 255));
 12      end loop;
 13      
 14      dbms_sql.parse(i_cursor, t_lines, t_lines.FIRST, t_lines.LAST, false, DBMS_SQL.native);
 15      dbms_sql.close_cursor(i_cursor);
 16  end;
 17  /
Every time I call this procedure, I get the following error

ORA-01912: keyword ROW expected
ORA-06512: in "SYS.DBMS_SYS_SQL", Line 1485
ORA-06512: in "SYS.DBMS_SQL", Line 26
ORA-06512: in "NTSDEV6.EXECUTECLOB", Line 14
ORA-06512: in "NTSDEV6.CREATELOGTRIGGER", Line 150

Has anyone an idea what the heck is going on? I can't explain that ORA-01912.

Thanks for your help =)
This post has been answered by Peter Gjelstrup on Aug 19 2009
Jump to Answer

Comments

Mirza_Adeel

Dear ,

Did you resolve it i am facing same issue

Thanks

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 16 2009
Added on Aug 19 2009
4 comments
1,173 views