Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / April 2008

Tip: Looking for answers? Try searching our database.

Save results of a stored proc into a temp table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lunchroom@gmail.com - 03 Apr 2008 20:29 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.