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 -> Re: Counting rows from Dynamic SQL

Re: Counting rows from Dynamic SQL

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Fri, 01 Feb 2002 15:31:25 GMT
Message-ID: <2xy68.4810$sb4.23618@rwcrnsc51.ops.asp.att.net>


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

Original text of this message

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