Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Counting rows from Dynamic SQL
How about select count(*),abc,.....
Jim
"Jason Filby" <jason.filby_at_orafocus.com> wrote in message
news:1012550673.550534_at_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 - 09:31:25 CST