stummj
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Am I sure of what? I'm confused.......(which is really nothing new)....
>> "I know that rowcount for a cursor provides the number of rows processed."
ie. after the fetch
ishando: Thanks for the clarification (I thought that was implied.....it's kind of hard to process a row that hasn't been fetched)
ASKER
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.
I want to know if there is a way once you have the declaration whether you can determine how many rows in the select.
Not without doing the fetch - your alternative of doing a count would be the way to get this info
ASKER
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?
ASKER