Hypothetical situation:
I work at the main office of a company with a chain of retail stores.
I have a database by the name C:\EMPLOYEES.MDB
One of the tables in this database is NAME
This table consists of three fields: Store, Employee, First
(it associates the First Name with the Employee Number for each Store
Number)
The table might look something like...
Store Employee Name
===========================
1 1 Bob
1 2 Susan
1 3 Bill
2 1 Fred
2 2 Amy
2 3 Fran
3 1 John
3 2 Ann
3 3 Alice
I have a second database by the name of C:\SCHEDULE.MDB
One of the tables in this database is MONDAY
This table consists of four fields: Store, Employee, Department, Time
(it indicates when each employee is scheduled to come to work today and
which department they will work in)
Note: If an employee is not scheduled to come to work on MONDAY, they are
not in the table
The Table might look something like...
Store Employee Department Time
==================================
1 1 1 1:00
1 2 1 3:00
2 1 1 2:00
2 2 2 5:00
3 1 2 4:00
3 2 1 6:00
I need a record set that consists of everyone who works in Department 1
sorted by their arrival time for MONDAY
The record set should look something like...
Store Employee Name Time
==================================
1 1 Bob 1:00
2 1 Fred 2:00
1 1 Susan 3:00
3 2 Ann 6:00
Note that the record set combines fields from two tables, each table is in
a seperate database, the two tables have a different number of rows and a
different number of fields, each table requires two fields to uniquly
identify a record (the employee)
Can someone help me in creating an SQL statement that can build just such a
record set?
Thanks,
--
Joseph
(Remove nospam_ for reply)