Type - Model: 9406 - 520
i5/OS version: 5 Release 4 Modification 0
I need to be able to create a script that will allow me to store the
results of a stored proc into a session temp table. I need to be able
to do this in a script, not a stored procedure.
Something like this:
SELECT INTO Session.TempTable (CALL MyProc('12345'));
SELECT * FROM Session.TempTable WHERE Column1 = 'A';
MyProc already exists and I don't have the luxury of modifying it in
any way. Is this possible?
Serge Rielau - 03 Apr 2008 21:31 GMT
> Type - Model: 9406 - 520
> i5/OS version: 5 Release 4 Modification 0
[quoted text clipped - 10 lines]
> MyProc already exists and I don't have the luxury of modifying it in
> any way. Is this possible?
You can write an external table UDF (Java or C), consume the result set
there and return as a table.
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab