Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 28th, 2005, 12:01 PM
Authorized User
 
Join Date: Jan 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with displaying ID when finding max or min

Hello,
I am trying to make a summary table. I have a table with a bunch of data that contains like over 100 records for a single day. I am making a query to display the max and min temperatures for each day. Thats easy because I group by day and then use max and min but the tricky part is, How can I display the correct ID with this max or min. Each record has an ID associated with its record.

Thanks any help would be appreciated.
Marcin

 
Old October 3rd, 2005, 07:42 AM
Registered User
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SELECT Max(TEMP.TEMP) AS Max, Min(TEMP.TEMP) AS Min, TEMP.DAY,
First(TEMP.ID) AS ID
FROM TEMP
GROUP BY TEMP.DAY;


Because THAT I Suppose EACH DAY HAVE THE SAME ID






Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one get the Max or Min Filename? crabjoe ASP.NET 1.0 and 1.1 Basics 4 January 15th, 2008 04:48 PM
MAX/MIN Value Help slbibs SQL Server 2005 4 November 6th, 2007 04:00 AM
MIN( MAX( UPDATE Stuart Stalker SQL Language 3 February 21st, 2007 07:10 AM
Finding min(FromDate) and max(ToDate) Gert SQL Language 0 May 10th, 2006 02:48 AM
Min / Max followup danbush XSLT 2 August 31st, 2005 12:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.