T
Thomas
Difficult to explain: I am trying to write a query that will display a time
interval rather than an actual time. I have two tables. Table 1 is the raw
data. One of the fields has the actual time an event occurred. I created
Table 2 for interval definitions with 3 fields. Field 1 is the intervalID
which would be 12:00AM, 12:30AM, 1:00AM, etc. (30 minute intervals). Field
2 is the begin qualifier 0:00:00, 0:30:00, 1:00:00, etc. Field 3 is the end
qualifier 0:29:59, 0:59:59, 1:29:59, etc. I created this so that I could
assign an intervalID to each record in table 1. For example, if a record in
Table 1 has a time equal to 16:49:56 (4:49pm +56 seconds), then it should
have intervalID 4:30PM - because it is between the begin qualifier 16:30:00
and the end qualifier 16:59:59 having intervalID 4:30PM.
I am trying to create a query that has these two source tables so that I can
have all records from table 1, and add a field to the end that would indicate
the interval the record took place.
----TABLE 1---- ----TABLE 2----
TIME INTERVAL_ID
FIELD2 BEGIN
FIELD3 END
----QUERY1----
TIME
FIELD2
FIELD3
INTERVAL_ID <-- HERE, I WANT THE 12:00AM, 12:30AM, 1:00AM, ETC. DEPENDING
ON WHERE IT FALLS IN BEGIN AND END TIME QUALIFIERS.
I HOPE THAT'S A CLEAR EXPLANATION?!
THANKS!!!!!!
THOMAS
interval rather than an actual time. I have two tables. Table 1 is the raw
data. One of the fields has the actual time an event occurred. I created
Table 2 for interval definitions with 3 fields. Field 1 is the intervalID
which would be 12:00AM, 12:30AM, 1:00AM, etc. (30 minute intervals). Field
2 is the begin qualifier 0:00:00, 0:30:00, 1:00:00, etc. Field 3 is the end
qualifier 0:29:59, 0:59:59, 1:29:59, etc. I created this so that I could
assign an intervalID to each record in table 1. For example, if a record in
Table 1 has a time equal to 16:49:56 (4:49pm +56 seconds), then it should
have intervalID 4:30PM - because it is between the begin qualifier 16:30:00
and the end qualifier 16:59:59 having intervalID 4:30PM.
I am trying to create a query that has these two source tables so that I can
have all records from table 1, and add a field to the end that would indicate
the interval the record took place.
----TABLE 1---- ----TABLE 2----
TIME INTERVAL_ID
FIELD2 BEGIN
FIELD3 END
----QUERY1----
TIME
FIELD2
FIELD3
INTERVAL_ID <-- HERE, I WANT THE 12:00AM, 12:30AM, 1:00AM, ETC. DEPENDING
ON WHERE IT FALLS IN BEGIN AND END TIME QUALIFIERS.
I HOPE THAT'S A CLEAR EXPLANATION?!
THANKS!!!!!!
THOMAS