Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DB2 :: RE: Access SQLCA fields inside a stored procedure accessing Db2

$
0
0
Author: Rohit Umarjikar
Posted: Thu Oct 27, 2016 9:28 pm (GMT 5.5)

Quote:
Is there a problem in returning SQLERRD(3) from your stored procedure, through one of the output parameters?
After opening the cursor, you will get 0 for SQLERRD(3). Because, rows are fetched only after FETCH statement is executed but this may or may not be true for multi row fetch cursors so it can not be used since the fetch is done by front end.
Welcome!!
Quote:
SELECT COUNT (*). Is there a better way of doing this?

It looks to me that, your design is poor because if you wanted total count of the rows then you let you design change to pass you back the count from one of the parameter but you want some short cuts? what it makes difficult to get count(*) from SP to change? or why do you need that count(*) now and not before?
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif


Viewing all articles
Browse latest Browse all 9405

Trending Articles