dbTalk Databases Forums  

Result Sets in Stored Procedure

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Result Sets in Stored Procedure in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
esmith2112
 
Posts: n/a

Default Result Sets in Stored Procedure - 06-02-2010 , 08:23 AM






If I have a stored procedure for which I have declared two cursors
"with return," but through the code enforce that only one of them is
opened depending on some logic test, what value should I use for the
RESULT SETS clause in the stored procedure declaration?

Thanks,
Evan

Reply With Quote
  #2  
Old   
jefftyzzer
 
Posts: n/a

Default Re: Result Sets in Stored Procedure - 06-02-2010 , 11:01 AM






On Jun 2, 6:23*am, esmith2112 <esmith2... (AT) gmail (DOT) com> wrote:
Quote:
If I have a stored procedure for which I have declared two cursors
"with return," but through the code enforce that only one of them is
opened depending on some logic test, what value should I use for the
RESULT SETS clause in the stored procedure declaration?

Thanks,
Evan
1

--Jeff

Reply With Quote
  #3  
Old   
esmith2112
 
Posts: n/a

Default Re: Result Sets in Stored Procedure - 06-02-2010 , 11:47 AM



Quote:
1

--Jeff
That's what I would expect as well. However, we get the SQL0466W
warning on occasion for some procs telling us:

SQL0466W The procedure "<procedure-name>" returns "<number-results>"
result sets from the stored procedure.

The value we're getting for <number-results> is 1. The RESULT SETS
declaration in the procedure definition is also 1. Just scratching our
heads why we get this sqlcode back from the server.

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.