Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Computer Technical Help
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2007, 10:18 AM
Big TR Big TR is offline
Senior Member
 
Join Date: Nov 2003
Location: Chicago, IL
Posts: 464
Default Access Max Values from Query

So I've got a query pulling values from a table, A=$100, B=$90, C=$105 for various projects.

What is the best way to pull out the maximum value for each data row in my table. In this example, I would want the query to show value C=$105. I will then need to pull this value into a report.

I'm having no luck.
Reply With Quote
  #2  
Old 04-19-2007, 10:24 AM
StevieG StevieG is offline
Senior Member
 
Join Date: Jan 2003
Location: b-more
Posts: 3,558
Default Re: Access Max Values from Query

select MAX(column) from table

oh, wait, you have several fields and you want the max for each row?

In MySQL, you can use the GREATEST comparison

select GREATEST(A, B, C) from table
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.