Restrictions and limitations affect the data extraction facility.
To set the Show multiple result sets option, click in the dbisql window, then select Show multiple result sets and click Make permanent.
When Temp_Extract_Name1 is set, you cannot perform INSERT...SELECT.
Events do not support execution of statements that return result sets. The server log returns an error similar to:
Handler for event 'test_ev' caused SQLSTATE '09W03' Result set not permitted in 'test_ev'
To execute a query through an event, create an event that calls a stored procedure and insert the stored procedure results into a temporary table. If extract is used, the temporary table is always empty and requires little overhead.
For example:
CREATE PROCEDURE proc1() BEGIN SET TEMPORARY OPTION temp_extract_name1 = 'testproc.out'; SELECT * FROM iq_table; END; CREATE EVENT "test_ev" ENABLE HANDLER BEGIN SELECT * INTO #tmp FROM proc1(); END; TRIGGER EVENT test_ev;