Join 2 Tables with query problem

  • Thread starter Thread starter ShyGuy
  • Start date Start date
S

ShyGuy

I have two tables. One has a list of available dates and some dates
are repeated twice. The other has a list of Places to go on specified
dates. I am trying to merge the two into one list where the results
would look like below.....

3/1/05 - Place One
3/1/05 -
3/7/05 - Place Two
etc.


I have tried a series of queries, with the final query being an
Append, but the best I can do is get a list of the dates that have a
place to go.

I can't seem to get the final append query to append the Date if there
is no place to go.

Any help will be greatly appreciated.
 
How about providing some sample records from each table and how you would
expect them to look in the final display. Also provide the logic of the
final display.
 
How about providing some sample records from each table and how you would
expect them to look in the final display. Also provide the logic of the
final display.


Thanks for the reply. Here is the data you asked for.


This is the table of booked appointments.
All fields always have data.

bkID Date Time
1 Wednesday, February 09, 2005 8:00 PM
54 Friday, February 18, 2005 8:00 PM
13 Wednesday, March 02, 2005 8:00 PM
55 Friday, March 04, 2005 8:00 PM
25 Friday, March 04, 2005 8:00 PM
21 Sunday, March 06, 2005 2:00 PM
28 Sunday, March 13, 2005 7:00 PM
52 Sunday, March 13, 2005 2:30 PM
30 Wednesday, March 16, 2005 8:00 PM
31 Friday, March 18, 2005 8:00 PM
32 Friday, March 18, 2005 8:00 PM
35 Monday, March 21, 2005 8:00 PM
9 Tuesday, March 22, 2005 8:00 PM
73 Wednesday, March 23, 2005 10:00 AM

This is a sample of the other table. This is all the possible booking
dates.

BookingDays
Wednesday, February 09, 2005
Friday, February 11, 2005
Friday, February 11, 2005
Sunday, February 13, 2005
Sunday, February 13, 2005
Wednesday, February 16, 2005
Friday, February 18, 2005
Friday, February 18, 2005
Sunday, February 20, 2005
Sunday, February 20, 2005
Tuesday, February 22, 2005
Wednesday, February 23, 2005
Friday, February 25, 2005
Friday, February 25, 2005
Sunday, February 27, 2005
Sunday, February 27, 2005
Wednesday, March 02, 2005
Friday, March 04, 2005
Friday, March 04, 2005
Sunday, March 06, 2005
Sunday, March 06, 2005
Wednesday, March 09, 2005
Friday, March 11, 2005
Friday, March 11, 2005
Sunday, March 13, 2005
Sunday, March 13, 2005
Wednesday, March 16, 2005
Friday, March 18, 2005
Friday, March 18, 2005
Sunday, March 20, 2005
Sunday, March 20, 2005
Monday, March 21, 2005
Tuesday, March 22, 2005
Wednesday, March 23, 2005

This is what I am trying to get.. I have been partially successful
but if ther is a booking for a date that is duplicated, that booking
is placed in both slots.

Date bkID
Wednesday, February 09, 2005 1
Friday, February 11, 2005
Friday, February 11, 2005
Sunday, February 13, 2005
Sunday, February 13, 2005
Wednesday, February 16, 2005
Friday, February 18, 2005 54
Friday, February 18, 2005
Sunday, February 20, 2005
Sunday, February 20, 2005
Tuesday, February 22, 2005
Wednesday, February 23, 2005
Friday, February 25, 2005
Friday, February 25, 2005
Sunday, February 27, 2005
Sunday, February 27, 2005
Wednesday, March 02, 2005 13
Friday, March 04, 2005 55
Friday, March 04, 2005 25
Sunday, March 06, 2005 21
Sunday, March 06, 2005
Wednesday, March 09, 2005
Friday, March 11, 2005
Friday, March 11, 2005
Sunday, March 13, 2005 28
Sunday, March 13, 2005 52
Wednesday, March 16, 2005 30
Friday, March 18, 2005 31
Friday, March 18, 2005 32
Sunday, March 20, 2005
Sunday, March 20, 2005
Monday, March 21, 2005 35
Tuesday, March 22, 2005 9
Wednesday, March 23, 2005 73
 
If the possible booking date records are exact duplicates then there is no
way (with SQL) to apply an appointment with one and not the other.
 
Back
Top