Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Counting rows from Dynamic SQL

Counting rows from Dynamic SQL

From: Jason Filby <jason.filby_at_orafocus.com>
Date: 1 Feb 2002 08:04:33 GMT
Message-ID: <1012550673.550534@proxy.storm.co.za>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US