Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return Max Field

Status
Not open for further replies.

theKeyper

Technical User
Jun 11, 2003
79
AU
Hi Guys,

I need to compare multiple fields and return the field that has the max value for that row. e.g.

SELECT HIGHEST(largest_classroom, largest_bedroom, largest_livingroom) AS largest_room

(Similar to the MAX() function but horizontal instead of vertical)

Thanks,
Keyper
 
Found It!

GREATEST()

Thanks,
Keyper

The Key is more powerful than the Sword.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top