PC Review


Reply
Thread Tools Rate Thread

Comparing fields and choosing record to display

 
 
Cita
Guest
Posts: n/a
 
      13th Nov 2008
Hello:

I am trying to figure out how to compare the same field in different records
to return the record that contains the higher value in a different field (in
a second query). In other words,

Field 1 Field 2
A34RT 400
A67YR 200
A34RT 250
A34RT 350

So, from this example, my 2nd query would return

Field 1 Field 2
A34RT 400
A67YR 200

Any help would be appreciated.

Thanks!
 
Reply With Quote
 
 
 
 
Beetle
Guest
Posts: n/a
 
      13th Nov 2008
As an example;

SELECT Field1, Max(Field2) As MaxOfField2 FROM YourTable
GROUP BY YourTable.Field1
ORDER BY Max(Field2) DESC;
--
_________

Sean Bailey


"Cita" wrote:

> Hello:
>
> I am trying to figure out how to compare the same field in different records
> to return the record that contains the higher value in a different field (in
> a second query). In other words,
>
> Field 1 Field 2
> A34RT 400
> A67YR 200
> A34RT 250
> A34RT 350
>
> So, from this example, my 2nd query would return
>
> Field 1 Field 2
> A34RT 400
> A67YR 200
>
> Any help would be appreciated.
>
> Thanks!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display only some fields from each record based on specific criter jmoore Microsoft Access Reports 7 2nd Feb 2009 06:22 PM
Display Record based on value of combination of 2 fields NoviceAccessUser-Melanie Microsoft Access Queries 4 29th Jan 2009 07:00 PM
Create Query to display three fields for every record in a table. AJRoad Microsoft Access Queries 4 26th Apr 2008 11:15 PM
Re: In Access, how do I display record yet omit empty fields? Rick Brandt Microsoft Access Queries 0 19th Dec 2006 04:02 PM
Query for Updating table - comparing 2 recs per user then choosing =?Utf-8?B?R3dlbg==?= Microsoft Access Queries 1 6th Nov 2006 11:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:11 AM.