View previous topic :: View next topic
|
Author |
Message |
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi All,
I declared a cursor for the multi row fetch
I am fetching like below.
Code: |
FETCH NEXT ROW SET CS1 FOR 10 ROWS INTO
:WS-A,
:WS-B; |
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? |
|
Back to top |
|
|
Steve Davies
New User
Joined: 15 Oct 2009 Posts: 32 Location: UK
|
|
|
|
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. |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Thanks alot Steve for the quick reply |
|
Back to top |
|
|
|