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  

bring related fields into a query that uses MaxofDate and GROUPBY



 
 
Thread Tools Display Modes
  #1  
Old October 20th, 2008, 08:11 PM posted to microsoft.public.access.queries
Lord Kelvan
external usenet poster
 
Posts: 637
Default bring related fields into a query that uses MaxofDate and GROUPBY

.... why dont you just add them to your normal query i see no reason to
use a sub query

SELECT GPSLocations.Individual_ID,
GPSLocations.LatWGS84,GPSLocations.LongWGS84 ,Max(GPSLocations.Date)
AS MaxOfDate
FROM GPSLocations
GROUP BY
GPSLocations.Individual_ID,GPSLocations.LatWGS84,G PSLocations.LongWGS84;


hope this helps

Regards
Kelvan
  #2  
Old October 20th, 2008, 08:56 PM posted to microsoft.public.access.queries
Jey
external usenet poster
 
Posts: 27
Default bring related fields into a query that uses MaxofDate and GROU

That was the first thing I tried, but what it produces is a MaxDate for each
unique combination of [Individual_ID, lat, and long] which is about 95% of
all the records. (These animals don't stay still for very long!). I need a
MaxDate for each unique combination of Individual_ID (i.e. one date per
individual) with the lat/long of just that one locate.
Jey

"Lord Kelvan" wrote:

.... why dont you just add them to your normal query i see no reason to
use a sub query

SELECT GPSLocations.Individual_ID,
GPSLocations.LatWGS84,GPSLocations.LongWGS84 ,Max(GPSLocations.Date)
AS MaxOfDate
FROM GPSLocations
GROUP BY
GPSLocations.Individual_ID,GPSLocations.LatWGS84,G PSLocations.LongWGS84;


hope this helps

Regards
Kelvan

 




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 07:01 AM.


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