Re: select MAX(field-name)
Posted in 1995
Dave Snyder — — source: Informix-list mailing list archive (1991-1998)
Quoting al-jouhar... } } 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.......!!! } Ok, rule 1... NULL (as far as Informix is concerned) means "unknown" Now if you ask for the MAXimum value of a set of data when there is no data to look at, the only logical value that can be returned is "unknown" or NULL, and that's what you got. DAS -- Dave Snyder @ Bell Atlantic - Philadelphia, PA EMAIL: (w) ddx85qr@bell-atl.com (h) dave@das13.snide.com WEB: http://www.ece.vill.edu/~dave/ (Now NETSCAPE enhanced!)