Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
I declared a cursor for the multi row fetch
I am fetching like below.
FETCH NEXT ROW SET CS1 FOR 10 ROWS INTO
My question is that.If in table there is only 5 rows present which is satisfying my criteria. Whats will be the SQLCODE which i will get.Is it 100? And alos will i get 5 rows in my WS-A, WS-B variables?
Yes and yes. And to answer the next question you're about to ask....."How do I know how many rows the FETCH has returned?", you need to check the SQLCA field SQLERRD(3) which is populated after the FETCH with the number of rows that DB2 fetched.