[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Pro*c  cursor rowcount

Posted on 2004-10-27
8
Medium Priority
?
1,792 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:stummj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1500 total points
ID: 12425151
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
 

Author Comment

by:stummj
ID: 12425221
rowcount gives the number of rows selected even before the fetch? Are you sure?!
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 12425283
Am I sure of what?  I'm confused.......(which is really nothing new)....
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 15

Expert Comment

by:ishando
ID: 12430075

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

ie. after the fetch
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 12432812
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
 

Author Comment

by:stummj
ID: 12438730
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
 
LVL 15

Expert Comment

by:ishando
ID: 12439883
Not without doing the fetch - your alternative of doing a count would be the way to get this info
0
 

Author Comment

by:stummj
ID: 12451656
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question