While in dbaccess :
type your query
select * from my_table group by a, b;
then in the menus choose:
_Output_ then _New file_ then wirite any name, x for example and enter.
Then the number of rows returned appear onscreen.
It happen to be very fast:
Once the query is typed do these combination of keys:
ESC - O - N - x - ENTER
It might seem ugly, but it's fast... but guess waht you're in 9.x son you could do:
select count(*)
from table( multiset(
select a,b from my_table group by a, b
) );
J.
-----Original Message-----
From: "ignacio mateos" <imateos@telefonica.net>
To: informix-list@iiug.org
Date: 6 Sep 2005 06:30:23 -0700
Subject: Howto: Count the number of groups returned by a Select (Informix 9)
Hi I am trying
select count ( distinct a|| b) from my_table;
but it turns out that count( distinct ) does not work on expressions.
(What I need is to know how many records the
select * from my_table group by a, b;
would return)
Is there a simple way to do this without using temp tables?
THANKS
Jean Sagi
jeansagi@myrealbox.com
jeansagi@gmail.com
sending to informix-list