Pro*c cursor rowcount

Is there any way of telling how many rows there are in a declared cursor BEFORE fetching the data?
A colleague suggested that there may be an attribute of SQLCA which will give me that but they have gone home and I can find no reference for SQLCA or how to use it!

Anyone got any ideas? The alternative would just be to do a count(*) of the SELECT statement, but I shouldnt have to!

Julian
stummjAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Don't think you can get there from here........

I know that rowcount for a cursor provides the number of rows processed.  I don't know of any way from SQLCA to obtain this.
0
 
stummjAuthor Commented:
rowcount gives the number of rows selected even before the fetch? Are you sure?!
0
 
slightwv (䄆 Netminder) Commented:
Am I sure of what?  I'm confused.......(which is really nothing new)....
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
ishandoCommented:

>> "I know that rowcount for a cursor provides the number of rows processed."

ie. after the fetch
0
 
slightwv (䄆 Netminder) Commented:
ishando:  Thanks for the clarification (I thought that was implied.....it's kind of hard to process a row that hasn't been fetched)
0
 
stummjAuthor Commented:
Thanks for trying but thats not what I asked.
I want to know if there is a way once you have the declaration whether you can determine how many rows in the select.
0
 
ishandoCommented:
Not without doing the fetch - your alternative of doing a count would be the way to get this info
0
 
stummjAuthor Commented:
Isnt there an attribute of the cursor itself? How is space reserved? I would have thought that once the cursor is declared, some space is reserved for it?
0
All Courses

From novice to tech pro — start learning today.