Hi,
The DB2 Version is 8.2.0
OS : Windows 2000
Below is the test procedure sp_print called in the trigger,
Code:
CREATE PROCEDURE sp_print
DYNAMIC RESULT SETS 1
LANGUAGE SQL
BEGIN
DECLARE s_temp_cursor CURSOR WITH HOLD WITH RETURN TO CLIENT FOR SELECT * FROM result_table FOR READ ONLY;
open s_temp_cursor;
END
@
The trigger trig_test that calls the above procedure,
Code:
CREATE TRIGGER trig_test AFTER INSERT ON test
REFERENCING NEW_TABLE AS INSERTED
FOR EACH STATEMENT
MODE DB2SQL
TRIGR: BEGIN ATOMIC
INSERT INTO result_table VALUES ( 1 ) ;
call sp_print;
END
@
regards,
Sn