|
From: buu on 26 Jun 2008 14:46 How could I find how many records has been passed by some select statement? for example, I have an select like: select sum(count(*) ) into retval from table1 where field1='1' group by field2, field3 having count(*)>1; so, I would like to have some like %RowCount attribute to find how many records this query have passed. (notice that there are aggregate functions and grouping). tnx...
From: sybrandb on 26 Jun 2008 15:31 On Thu, 26 Jun 2008 20:46:13 +0200, "buu" <aha(a)a.com> wrote: >How could I find how many records has been passed by some select statement? > >for example, I have an select like: >select sum(count(*) ) > into retval > from table1 > where field1='1' > group by field2, field3 > having count(*)>1; > >so, I would like to have some like %RowCount attribute to find how many >records this query have passed. (notice that there are aggregate functions >and grouping). > >tnx... > http://tahiti.oracle.com, search for rowcount. You will find SQL%rowcount. Please avoid asking questions here if you didn't search the documentation first. -- Sybrand Bakker Senior Oracle DBA
From: Ed Prochak on 26 Jun 2008 17:19 On Jun 26, 1:46 pm, "buu" <a...(a)a.com> wrote: > How could I find how many records has been passed by some select statement? > > for example, I have an select like: > select sum(count(*) ) > into retval > from table1 > where field1='1' > group by field2, field3 > having count(*)>1; > > so, I would like to have some like %RowCount attribute to find how many > records this query have passed. (notice that there are aggregate functions > and grouping). > > tnx... Is SELECT sum(count(*) ), count(*) rows_passed_into_SUM .... what you are looking for? Ed (Sometimes it just takes another pair of eyes.)
|
Pages: 1 Prev: query optimization Next: converting DB2 triggers to Oracle |