View Single Post

   
  #5 (permalink)  
Old 02-24-2008, 02:54 PM
ChrisH
 
Posts: n/a
Default Re: Schema Level Trigger difficulties

Have answered my own question now.

ora_sql_txt (sql_text out
ora_name_list_t)

BINARY_INTEGER

Returns the SQL text of the triggering statement in the OUT parameter.
If the statement is long, it is broken up into multiple PL/SQL table
elements. The function return value specifies how many elements are in
the PL/SQL table.
sql_text ora_name_list_t;
stmt VARCHAR2(2000);
....
n := ora_sql_txt(sql_text);
FOR i IN 1..n LOOP
stmt := stmt || sql_text(i);
END LOOP;
INSERT INTO event_table ('text
of triggering statement: ' ||
stmt);

thanks.

chris.

Reply With Quote