L
Legacy 98055
Guest
<font color="#202020" size="3" face="Courier New"><pre>Table name = MOVES_ALL
REQTRL PIKTRL MOVTRL
1/1/02 5:58 PM 1/1/02 7:19 PM 1/1/02 7:32 PM
1/1/02 7:31 PM 1/1/02 7:42 PM 1/1/02 7:43 PM
1/1/02 7:35 PM 1/1/02 7:52 PM 1/1/02 7:52 PM
1/1/02 7:51 PM 1/1/02 8:11 PM 1/1/02 8:11 PM
1/1/02 7:57 PM 1/1/02 8:01 PM 1/1/02 8:03 PM
1/1/02 7:57 PM 1/1/02 8:01 PM 1/1/02 8:08 PM
1/1/02 7:58 PM 1/1/02 8:13 PM 1/1/02 8:16 PM
1/1/02 8:19 PM 1/1/02 9:16 PM 1/1/02 9:17 PM
</pre></font>
Hello helpers! I appreciate it.
The above are three fields from the further above mentioned table which have to do with my query. I am very new to SQL and have found it fairy easy to do simple queries of (from date) (to date) but I have run into a small roadblock. The three fields here are the only fields in this table which offer date and time information. The first column of dates is when a the assignment of the task takes place, the second is when it begins, the third is when it is finished. I need to query any of the above for given shifts worked without having to supply the datevalue but only the time value and/or the day of the week. A literal examples:
Return all records which occured between 6 AM to 6PM, on Monday to Wednesday, in the given date range.
What is the syntax if I wanted to query for, say,
01/01/02 00:00 AM to 12/31/02 23:59 PM for all records which occured from any Wednesday within the date range above and the timeframe from Wednesday 6PM to Thursday 6AM ?
The database is still in design and I could easily break up the date fields into three separate fields such as:
03/20/03 15:00 PM could be broken up into these three separate fields:
<font color="#202020" size="3" face="Courier New"><pre>03/20/2003 15:00 PM Thursday</font></pre>
I am willing to do that if you think it would be more efficient but I am betting that there is a way to query with the information structured as is?
That is my question.
Thanks,
Tom
Using VB with ADO 2.6 on a Microsoft Database (mdb)
BTW
<font color="#202020" size="10" face="Courier New">SUPERBONUS</font> question here!
Is it possible to get the average in minutes from field REQTRL to PIKTRL for any given query using SQL?
Thanks again!
REQTRL PIKTRL MOVTRL
1/1/02 5:58 PM 1/1/02 7:19 PM 1/1/02 7:32 PM
1/1/02 7:31 PM 1/1/02 7:42 PM 1/1/02 7:43 PM
1/1/02 7:35 PM 1/1/02 7:52 PM 1/1/02 7:52 PM
1/1/02 7:51 PM 1/1/02 8:11 PM 1/1/02 8:11 PM
1/1/02 7:57 PM 1/1/02 8:01 PM 1/1/02 8:03 PM
1/1/02 7:57 PM 1/1/02 8:01 PM 1/1/02 8:08 PM
1/1/02 7:58 PM 1/1/02 8:13 PM 1/1/02 8:16 PM
1/1/02 8:19 PM 1/1/02 9:16 PM 1/1/02 9:17 PM
</pre></font>
Hello helpers! I appreciate it.
The above are three fields from the further above mentioned table which have to do with my query. I am very new to SQL and have found it fairy easy to do simple queries of (from date) (to date) but I have run into a small roadblock. The three fields here are the only fields in this table which offer date and time information. The first column of dates is when a the assignment of the task takes place, the second is when it begins, the third is when it is finished. I need to query any of the above for given shifts worked without having to supply the datevalue but only the time value and/or the day of the week. A literal examples:
Return all records which occured between 6 AM to 6PM, on Monday to Wednesday, in the given date range.
What is the syntax if I wanted to query for, say,
01/01/02 00:00 AM to 12/31/02 23:59 PM for all records which occured from any Wednesday within the date range above and the timeframe from Wednesday 6PM to Thursday 6AM ?
The database is still in design and I could easily break up the date fields into three separate fields such as:
03/20/03 15:00 PM could be broken up into these three separate fields:
<font color="#202020" size="3" face="Courier New"><pre>03/20/2003 15:00 PM Thursday</font></pre>
I am willing to do that if you think it would be more efficient but I am betting that there is a way to query with the information structured as is?
That is my question.
Thanks,
Tom
Using VB with ADO 2.6 on a Microsoft Database (mdb)
BTW
<font color="#202020" size="10" face="Courier New">SUPERBONUS</font> question here!
Is it possible to get the average in minutes from field REQTRL to PIKTRL for any given query using SQL?
Thanks again!