Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

get the number of rows in a cursor?

kramJul 8 2007 — edited Jul 9 2007
Currently I have a pretty simple stored procedure that builds some dynamic SQL then returns those results to some code.

I would like also to be able to return the number of rows in that cursor back to the Java code, how can I do this? Some sample SQL is shown below:

l_query := 'Select * from customer';
OPEN searchResults FOR l_query;
???? Select count(*) into totalResults from searchResults; ????
(^^This last row is the issue)

I need to return the varaible totalResults as the count

Thanks heaps!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2007
Added on Jul 8 2007
4 comments
1,150 views