R
rstemper
I have worked in Excel for years but now find that I need to perform a query
in Access because of database size limitations where the total lines exceed
the Excel limit. The database column headings are shown below, but the
Interval_DateTime and Interval_Data are the subject of my query. The data
is provided in 15 minute intervals starting with 00:00. Several years of
data may be provided. So the database looks like the following:
ID Acct Nbr Interval_DateTime Interval_Length Interval_usage
1 137264594 8/28/2002 15 234
2 137264594 8/28/2002 12:15:00 AM 15 234
3 137264594 8/28/2002 12:30:00 AM 15 234.58
4 137264594 8/28/2002 12:45:00 AM 15 235.44
5 137264594 8/28/2002 1:00:00 AM 15 236.86
Etc.
What I need to do is to sum the 15 minute intervals into hourly intervals
(00:00 - 00:45, 01:00 - 01:45, etc). The end result being a table of daily
usage by hour for each account number - generally there will be only one
account number for each record set but I'd like to have the code recognize
account numbers because there may be rare cases where the table includes
more than one account number. I thought I'd be able to find an example by
googling newsgroups but I have not been successful. I'd prefer to see the
SQL code to help me develop an understanding of the procedure.
Thank you, your assistance is greatly appreciated.
in Access because of database size limitations where the total lines exceed
the Excel limit. The database column headings are shown below, but the
Interval_DateTime and Interval_Data are the subject of my query. The data
is provided in 15 minute intervals starting with 00:00. Several years of
data may be provided. So the database looks like the following:
ID Acct Nbr Interval_DateTime Interval_Length Interval_usage
1 137264594 8/28/2002 15 234
2 137264594 8/28/2002 12:15:00 AM 15 234
3 137264594 8/28/2002 12:30:00 AM 15 234.58
4 137264594 8/28/2002 12:45:00 AM 15 235.44
5 137264594 8/28/2002 1:00:00 AM 15 236.86
Etc.
What I need to do is to sum the 15 minute intervals into hourly intervals
(00:00 - 00:45, 01:00 - 01:45, etc). The end result being a table of daily
usage by hour for each account number - generally there will be only one
account number for each record set but I'd like to have the code recognize
account numbers because there may be rare cases where the table includes
more than one account number. I thought I'd be able to find an example by
googling newsgroups but I have not been successful. I'd prefer to see the
SQL code to help me develop an understanding of the procedure.
Thank you, your assistance is greatly appreciated.