several fields with similar value

M

marie

Hi, I would like to know if someone can tell me how I
could find the highest value within several fields. I
know that the Max and Dmax functions can only find the
values within the same field. Thanks in advance
 
G

Gerald Stanley

Try a UNION query e.g.
SELECT Max(columnValue)
FROM
(SELECT Max(col1) As columnValue FROM YourTable
UNION
SELECT Max(col2) FROM YourTable
UNION
SELECT Max(col3) FROM YourTable
etc)

Hope This Helps
Gerald Stanley MCSD
 
Top