473,395 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Class Scheduling Query

Sue
I have a large training database that contains many records of future
training courses. For a course there could be only one class or multiple
classes. Where there are multiple classes, each class is held at the same
time for each class day. Some multiple classes may be on consecutive days,
once a week or once a month. The relative tables and fields are:
TblCourseClass
CourseClassID
CourseID
BeginTime
EndTime

TblCourseClassDate
CourseClassDateID
CourseClassID
CourseClassDate

I need a query to help me add a new course that is multiple classes to the
schedule. Given the number of classes, the time needed for the class
(EndTime - BeginTime), and whether the class is on consecutive days, once a
week or once a month, I need the query to find all the available days and
time slots the course can be scheduled.

Thanks!

Sue
Nov 13 '05 #1
1 2100
Sue-

The general solution to find out if a "slot" is available involves checking
a selected date and time span against the records already saved. Let's say
you want to try to schedule a class on January 15, 2005 between 9a and 10a.
If the following query returns no rows, then the slot is available:

SELECT CourseClassID
FROM tblCourseClass INNER JOIN tblCourseClassDate
ON tblCourseClass.CourseClassID = tblCourseClassDate.CourseClassID
WHERE tblCourseClassDate.CourseClassDate = #01 JAN 2005#
AND tblCourseClass.BeginTime < #10:00:00 AM#
AND tblCourseClass.EndTime > #09:00:00 AM#

--
John Viescas, author
"Building Microsoft Access Applications" (Coming Soon!)
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
"Sue" <sm*****@please.nospam> wrote in message
news:G0*****************@newsread3.news.atl.earthl ink.net...
I have a large training database that contains many records of future
training courses. For a course there could be only one class or multiple
classes. Where there are multiple classes, each class is held at the same
time for each class day. Some multiple classes may be on consecutive days,
once a week or once a month. The relative tables and fields are:
TblCourseClass
CourseClassID
CourseID
BeginTime
EndTime

TblCourseClassDate
CourseClassDateID
CourseClassID
CourseClassDate

I need a query to help me add a new course that is multiple classes to
the
schedule. Given the number of classes, the time needed for the class
(EndTime - BeginTime), and whether the class is on consecutive days, once
a
week or once a month, I need the query to find all the available days and
time slots the course can be scheduled.

Thanks!

Sue

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
5
by: SB | last post by:
Can anyone provide any insight/advice on how to take a problem (academic assignment) and figure out what the classes should be? I have an assignment that is basically a doctors scheduling program,...
13
by: Mike | last post by:
Normally scheduling a job is a very elementary operation but for some hidden reason I've been unable to schedule a job which runs on a 28 day cycle, even though I have at least 16 other jobs...
2
by: Jake | last post by:
Hi, I originally posted in the db group but thought this might be more appropriate here. I have a scheduling application which allows the user to reserve timeslots for various things but I'm...
3
by: Alphonse Giambrone | last post by:
Can anyone point me toward a good example of an asp.net scheduling app? Preferrably in vb.net. TIA -- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
4
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a...
2
by: Jeff Johnson | last post by:
Disclaimer: I am extremely new to Web services and may very well be doing the wrong thing! Background: I have a Web service and a Windows Forms client app (VS 2005). The Web service exposes a...
2
Ritchie
by: Ritchie | last post by:
Please can anyone help me with d programs in C for CPU scheduling: WAP to show FCFS scheduling algorithm. WAP to show SJF scheduling algorithm. WAP to show Priority scheduling algorithm. WAP...
34
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.