Getting the number of rows before fetch?



IBM's flagship relational database management system

Getting the number of rows before fetch?

Postby jijojohn2367 » Sat Jul 15, 2017 1:02 pm

Is there any way to know how many rows my cursor is going to return before fetch?
Will SQLERRD(3) contain the number of rows after OPEN CURSOR statement?
jijojohn2367
 
Posts: 3
Joined: Tue Jul 11, 2017 11:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting the number of rows before fetch?

 

Re: Getting the number of rows before fetch?

Postby NicC » Sat Jul 15, 2017 5:17 pm

You could always do a COUNT query using the curor values. But to answer your specific question about SQLERRD(3) why not read the documentation amd if not sure after that start researching on the web - but stsrt with the official documentation.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2748
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 110 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post