Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting rowcount from weak refcursor

Status
Not open for further replies.

mileni

Programmer
May 29, 2003
2
IT
Hy,
i have a package with procedure like this
xxx(refcur out sys_refcursor, numrows out number)
begin
open refcur for
select * from table;
numrows := refcur%rowcount; -- this is ZERO!!!
end xxx;

i need to know if there is some solution to read hove many rows are there without looping thru rows or executing another equal select???
Thanks, Alen
 
To count rows you may open another cursor for SELECT COUNT(*) FROM TABLE. But in any case you should FETCH some data to obtain result.

Regards, Dima
 
Thanks, man!
I'm trying to avoid writing another cursor and to fetch it, but it seems to me that it is not possible...

Thanks, anyway!!!
Alen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top