Re: select MAX(field-name)
Posted in 1995
"Kai G. Hintze — — source: Informix-list mailing list archive (1991-1998)
>
> when I run SELECT MAX(col1) from table-name
> where col2 = something
> It returns 1 row(s) retrieved and the output is null, however
> select col1 from table-name
> where col2 = something> It returns No rows found.......!!!
>
This is expected behavior. Any aggregate function (MAX, MIN, COUNT,
AVG) will always return 1 row--even when the row is empty, as in
this case, when a straight select would return "No rows found."
--
-- Kai. \\\\//_
kaih@courtlink.utcourts.gov Live long and prosper.
#include <st_disclaim.h>