Do you actually need to access the result several times?
Then you should materialize it in a Global Temporary Table.
When you only want to return it to the client, it's
replace procedure xxx (...)
dynamic result sets 1
begin
...
declare rslt cursor with return only to client for
select .....;
open rslt; -- don't close it!!
Do you actually need to access the result several times?
Then you should materialize it in a Global Temporary Table.
When you only want to return it to the client, it's
Dieter