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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
query to find when an event happened
I have 12 years of weather data in one table, and have queries to give
me total rainfalls between different dates etc, as well as max and min temperatures. What I would like now is a query to tell me what date in a selected range the max or min temperature was. I have tried the WHERE clause just see what it would return but I got a syntax error. Thanks |
#2
|
|||
|
|||
query to find when an event happened
See:
Getting a related field from a GroupBy (total) queryat: http://www.mvps.org/access/queries/qry0020.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Bob H" wrote in message ... I have 12 years of weather data in one table, and have queries to give me total rainfalls between different dates etc, as well as max and min temperatures. What I would like now is a query to tell me what date in a selected range the max or min temperature was. I have tried the WHERE clause just see what it would return but I got a syntax error. Thanks |
#3
|
|||
|
|||
query to find when an event happened
Thanks for the link, but I can only get as far as the first query, where
it gives me the dates where we had rain, all 1100 of them. I can't work out how to get the highest value of rainfall along with the date it fell. Thanks Allen Browne wrote: See: Getting a related field from a GroupBy (total) queryat: http://www.mvps.org/access/queries/qry0020.htm |
#4
|
|||
|
|||
query to find when an event happened
In essence, you use a Totals query to get the highest rainfall in the
period. Then you use a subquery or a DLookup() expression to look up what the date was that recorded the highest rainfall in the period. If subqueries are the issue, here's an introduction: http://allenbrowne.com/subquery-01.html If you need to use DLookup(): http://allenbrowne.com/casu-07.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Bob H" wrote in message ... Thanks for the link, but I can only get as far as the first query, where it gives me the dates where we had rain, all 1100 of them. I can't work out how to get the highest value of rainfall along with the date it fell. Thanks Allen Browne wrote: See: Getting a related field from a GroupBy (total) queryat: http://www.mvps.org/access/queries/qry0020.htm |
#5
|
|||
|
|||
query to find when an event happened
Bob,
It would be helpful if you would post the query you have. Trying to provide you with a solution, without knowing what you are currently working with is a real challenge. ---- HTH Dale "Bob H" wrote: Thanks for the link, but I can only get as far as the first query, where it gives me the dates where we had rain, all 1100 of them. I can't work out how to get the highest value of rainfall along with the date it fell. Thanks Allen Browne wrote: See: Getting a related field from a GroupBy (total) queryat: http://www.mvps.org/access/queries/qry0020.htm . |
#6
|
|||
|
|||
query to find when an event happened
Dale, I managed to get this problem sorted now, thanks.
I ended up with just a simple query and using SELECT MAX to get what I wanted. I've also used SELECT MIN for the minimum temperatures. Thanks anyway Dale Fye wrote: Bob, It would be helpful if you would post the query you have. Trying to provide you with a solution, without knowing what you are currently working with is a real challenge. ---- HTH Dale "Bob H" wrote: Thanks for the link, but I can only get as far as the first query, where it gives me the dates where we had rain, all 1100 of them. I can't work out how to get the highest value of rainfall along with the date it fell. Thanks Allen Browne wrote: See: Getting a related field from a GroupBy (total) queryat: http://www.mvps.org/access/queries/qry0020.htm . |
Thread Tools | |
Display Modes | |
|
|