By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,488 Members | 2,545 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,488 IT Pros & Developers. It's quick & easy.

Can I query max data for three time frames daily for a month?

P: n/a
I have a quality control database containing data for samples pulled
every four hours (several years worth of data). What I need to do is
find the maximum value for a field for each eight hour increment daily
for a month.

Let's call the relevant fields [sampledate], [sampletime], and [Data].
If my data were:

[sampledate]..[sampletime]..[Data]
10/01/03 ...... 0200 ....... 15
10/01/03 ...... 0600 ....... 25
10/01/03 ...... 1000 ....... 37
10/01/03 ...... 1400 ....... 12
10/01/03 ...... 1800 ....... 98
10/01/03 ...... 2200 ....... 67
10/02/03 ...... 0200 ....... 250
10/02/03 ...... 0600 ....... 23
etc

I need the query to return:
10/01/03 0000-0759 25
10/01/03 0800-1559 37
10/01/03 1600-2359 98
10/02/03 0000-0759 250
etc

I have tried cascading queries and everything else I could find on the
google forums and am at a complete loss. I am sure this is fairly
simple, but (to quote Jimmy Buffett) just like the JitterBug it
completely eludes me. Any help would be GREATLY appreciated, I cannot
seem to get this to give me any meaningful data.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I know it's rude to follow-up your own message, but I figured it out
(finally). When I get time I'll post the relevant code in case anyone
needs to do this also.

Go******@mchsi.com (DSmith) wrote in message news:<34**************************@posting.google. com>...
I have a quality control database containing data for samples pulled
every four hours (several years worth of data). What I need to do is
find the maximum value for a field for each eight hour increment daily
for a month.

Let's call the relevant fields [sampledate], [sampletime], and [Data].
If my data were:

[sampledate]..[sampletime]..[Data]
10/01/03 ...... 0200 ....... 15
10/01/03 ...... 0600 ....... 25
10/01/03 ...... 1000 ....... 37
10/01/03 ...... 1400 ....... 12
10/01/03 ...... 1800 ....... 98
10/01/03 ...... 2200 ....... 67
10/02/03 ...... 0200 ....... 250
10/02/03 ...... 0600 ....... 23
etc

I need the query to return:
10/01/03 0000-0759 25
10/01/03 0800-1559 37
10/01/03 1600-2359 98
10/02/03 0000-0759 250
etc

I have tried cascading queries and everything else I could find on the
google forums and am at a complete loss. I am sure this is fairly
simple, but (to quote Jimmy Buffett) just like the JitterBug it
completely eludes me. Any help would be GREATLY appreciated, I cannot
seem to get this to give me any meaningful data.

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.