A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do i get the product of max. price in access2007 query?



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2010, 10:34 AM posted to microsoft.public.access.queries
AMR
external usenet poster
 
Posts: 20
Default How do i get the product of max. price in access2007 query?

in query i want to get product ID with the Max. or Min. price
  #2  
Old May 5th, 2010, 01:00 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default How do i get the product of max. price in access2007 query?

The SQL statement for a query to do that would be

SELECT ProductID
FROM SomeTable
WHERE Price = DMax("Price","SomeTable")

OR

SELECT TOP 1 ProductID
FROM SomeTable
ORDER BY Price DESC

IF you need something more specific post more details on what you are
attempting to do.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

amr wrote:
in query i want to get product ID with the Max. or Min. price

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.