Re: Getting the number of rows returned by a select with group by.
Posted in 2004
What about the "select dbinfo('sqlca.sqlerrd2')" function? See page
4-134 of the SQL Syntax Guide version 9.2.
Brice Avila
"David N. Heydon" <david.heydon@LangdonSystems.com> wrote in message news:<ciu99r$47n$1@news.xmission.com>...
> I've have a quick look around and don't seem to be able to find a solution
> to count the number of rows returned by queries like:-
>
> SELECT a,b,c,COUNT(*) FROM x
> GROUP BY a,b,c
> HAVING COUNT(*) > 1>
> I've seen that syntax like:-
>
> SELECT COUNT(*) FROM (SELECT a,b,c,COUNT(*) FROM x GROUP BY a,b,c HAVING> COUNT(*) > 1) x1
>
> works on other databases. Is there a simple way to do this on Informix
> without using a temporary table? Target databases will be IDS version 7.30
> or above.
>
> Thanks in advance,
>
> David
> sending to informix-list