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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highest value

Status
Not open for further replies.

CarrieR

Technical User
Nov 9, 2001
60
US
Hope I explained this correctly:

I have a table we will call “Defects” lined one to many to a table called “Defect Events”. I have taken a defect # highest value (counter field order Num, grouped on “Max”. This retrieves the records correctly, I just want the highest value from a particular defect #.

Defect Num Max order Num
670 4

In this query, I need to retrieve the max value of a particular defect, but when I add field “assigned users” I get all the users, not the user of the highest value. The assigned user field is the linking field to next table storing the user names. Example below:

Defect Num Max order Num
670 4
670 3
670 2
670 1

This won’t work correctly to get me last user of highest order #. I can’t use top value as there are hundreds of defects with multiple assigned to users. When I add in assigned users, linked field on defect events table I then get all the users, not just the one from the highest value. I am trying to do this in 2 queries, but as the assigned users is the linking field for second query, I still get all users (there are multiple users per events per defect #.)

Any suggestions out there? Many thanks….
 
Can anybody out there help me on this?
 
Topic already covered so many times ...
What have you tried to search to get nothing ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top