Unix Technical Forum

multiple result sets

This is a discussion on multiple result sets within the DB2 forums, part of the Database Server Software category; --> look at the procedure below CREATE PROCEDURE PR_2 ( ) dynamic result sets 1 BEGIN declare cursor_1 cursor with ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:50 AM
situ
 
Posts: n/a
Default multiple result sets

look at the procedure below

CREATE PROCEDURE PR_2 ( )
dynamic result sets 1
BEGIN
declare cursor_1 cursor with return to caller
for select *from elements;
open cursor_1;
END

the above procedure returns only one result set
can any body show me how to return multiple result sets.

thanks in advance

situ

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:50 AM
Kiran
 
Posts: n/a
Default Re: multiple result sets


CREATE PROCEDURE PR_3 ( )
dynamic result sets 2
BEGIN
declare cursor_1 cursor with return to caller
for select * from elements;

declare cursor_2 cursor with return to caller
for select * from elements;
open cursor_1;
open cursor_2;
END



situ wrote:

> look at the procedure below
>
> CREATE PROCEDURE PR_2 ( )
> dynamic result sets 1
> BEGIN
> declare cursor_1 cursor with return to caller
> for select *from elements;
> open cursor_1;
> END
>
> the above procedure returns only one result set
> can any body show me how to return multiple result sets.
>
> thanks in advance
>
> situ


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:50 AM
situ
 
Posts: n/a
Default Re: multiple result sets

thanks.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com