Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Counting rows from Dynamic SQL
Hey all
I'm using dynamic SQL to retrive rows for a search query. Now I also need to return the number of rows found.
Right now I'm using to SQL statements -- one to count the rows (with select count(*)) and one to get the values (with select abc, def, ghi).
Isn't there some way to obtain the count of rows selected with the dbms_sql package? Then I could only use one dynamic SQL statement (select abc, def, ghi) instead of two.
I know dbms_sql.execute returns the number of rows processed.. but 0 for a select statement.
Thanks
- Jason
Posted via www.orafocus.com - Focusing on the World of Oracle Received on Fri Feb 01 2002 - 02:04:33 CST
![]() |
![]() |