IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 UDB Stored Procedure "Select Into" with -811


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Lenny2113

New User


Joined: 20 Dec 2009
Posts: 2
Location: USA

PostPosted: Thu Jul 08, 2010 5:59 pm
Reply with quote

Hi all,
I have a UDB Stored Procedure which has "Select into". It returns -811 and does not retrieve any rows into host variables.
Any suggestions why? (Besides cursor)

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 08, 2010 6:04 pm
Reply with quote

because an -811 (in release vsn7 and above)
does not populate any host variables.
Back to top
View user's profile Send private message
Lenny2113

New User


Joined: 20 Dec 2009
Posts: 2
Location: USA

PostPosted: Thu Jul 08, 2010 8:20 pm
Reply with quote

Thank you! Will do cursor
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 08, 2010 8:23 pm
Reply with quote

glad we were able to help.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 09, 2010 12:09 am
Reply with quote

Sorry it took me so long to think of it,

but you can put a:
FETCH FIRST ROW ONLY
clause in the singleton select and you don't have to deal with cursors.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Dynamically pass table name to a sele... DB2 2
No new posts SELECT from data change table DB2 5
No new posts Select two different counts from SQL... DB2 6
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
Search our Forums:

Back to Top