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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.