Solved

need to create a criteria to filter by max value in query select

Posted on 2010-11-20
3
701 Views
Last Modified: 2012-08-14
I tried using the max function but it's returning all the records screenshot
0
Comment
Question by:solarisinfosys
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 500 total points
ID: 34182069
You can use TOP 1 Query expression for that purpose. Below link will guide you how to do it.

http://www.blueclaw-db.com/accessquerysql/select_top.htm

Sincerely,
Ed
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 34182077

I used the same expression with some of my applications and it worked perfectly. Here's a sample sql statement on it:

SELECT Top 1 Location.LocationID, Location.State, Location.City
FROM Location
ORDER BY Location.LocationID DESC;

The result display the Max value of  LocationID with its corresponding records.

Sincerely,
Ed

0
 

Author Closing Comment

by:solarisinfosys
ID: 34185307
Thanks, it worked perfectly. Thanks for the example
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question