Background: when inserting data into a data table, a defined stored procedure is called to parse the inserted data in xml format. The Stored Procedure contains parameters. Solution: Create a trigger for inserting a data table.
Background: when inserting data into a data table, a defined stored procedure is called to parse the inserted data in xml format. The Stored Procedure contains parameters. Solution: Create a trigger for inserting a data table.
Background: when inserting data into a data table, a defined stored procedure is called to parse the inserted data in xml format. The stored procedure includes parameters,
Solution: Create a trigger for inserting data tables and call the stored procedure in the trigger.
Stored Procedure: see the previous article Oracle parsing xml strings using Stored Procedures
Insert statement: insert into t_xml (2 ,' Name1 80% ')
Trigger creation:
Create or replace trigger TRG_t_PARSE
Before insert on t_xml
Referencing
For each row
Declare
-- Local variables here
-- Pragma autonomous_transaction; -- an autonomous transaction that can have a commit
Begin
P_parse (: new. id); -- call the stored procedure and pass the parameter "new. id ".
-- Commit;
EndTRG_t_PARSE;