Re: Hourly volume calculation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dear Tom:

Thank you Kindly. That is exactly what I need.

Best regards.

Zimme


"Tom Ellison" wrote:

Dear Zimme:

I recommend starting with a table representing the 24 hour period. It needs
only one column containing the values of the 24 hours in a day:

Table: Hours
Hr
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

Now, are you creating one sum for everything within the table, or one for
each day in the table, or for just one day from the table, or what?

For everything within the table:

SELECT
(SELECT MAX(Hr)
FROM Hours
WHERE Hr < DateTime)
AS Hr,
DateTime
FROM YourTable

Fix this up for your table and column names (YourTable and DateTime). Does
this give a start? What more help might you need?

Tom Ellison


"Zimme" <Zimme@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7ACB2472-529D-454A-B478-72334D194F7E@xxxxxxxxxxxxxxxx
Hello:

I have a table with among others fields, a date-time field and a volume
field consisting multiple volume entries. I need to sum up the volumes by
the
hours.

For example, there may be a sum volume of 5000 between 16:00 to 16:59 hr
after totaling the different entries.

At the end of the day, I will have another table or query with 24 records
for the 24 hours.

Would anyone be able to assist with ideas or codes? Thanks. Best Regards.




.



Relevant Pages

  • Re: Conditional Sum
    ... Regards, ... Peo Sjoblom ... > I would like help on a function to sum the last five entries in a column. ...
    (microsoft.public.excel.worksheet.functions)
  • RE: Flying Hours
    ... "Loadmaster" wrote: ... I also need the sum of the last 12 entries in a ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Problem
    ... Is there any way to create a query like i could use sub queries in the query ... "Tom Ellison" wrote: ... > The Need column you have is not the sum of all the needed quantities. ...
    (microsoft.public.access.queries)
  • Re: Problem
    ... Is there any way to create a query like i could use sub queries in the query ... "Tom Ellison" wrote: ... > The Need column you have is not the sum of all the needed quantities. ...
    (microsoft.public.access.queries)
  • Re: 50+50+17.5%=117.5
    ... If the government puts a 17.5% tax on every 100 pennies I spend at the point ... Regards ... >> Yep, my problem is that simple, I don't know how to put the sum above ...
    (microsoft.public.excel)