I only need the first date not all 3

S

Steven

I need to create a query that spans (joins) two tables, tblSchedule and
tblScheduleDetails. the latter lists specific days for each of the former's
records. Eg.:tblSchedule contains the record "Physics Intro",
tblScheduleDetails contains 3 specific dates (records) when "Physics Intro"
takes place)

The query i need to build lists all schedules (courses) only once, along
with the first date the course is scheduled not all the associated dates in
tblScheduleDetails. Can anyone assist, i can only get repeated course records
for each date? Thanks
 
M

Marshall Barton

Steven said:
I need to create a query that spans (joins) two tables, tblSchedule and
tblScheduleDetails. the latter lists specific days for each of the former's
records. Eg.:tblSchedule contains the record "Physics Intro",
tblScheduleDetails contains 3 specific dates (records) when "Physics Intro"
takes place)

The query i need to build lists all schedules (courses) only once, along
with the first date the course is scheduled not all the associated dates in
tblScheduleDetails. Can anyone assist, i can only get repeated course records
for each date?


SELECT tblSchedule.course,
Min(tblScheduleDetails.scheduledate) As FirstDate
FROM tblSchedule INNER JOIN tblScheduleDetails
ON tblSchedule.courseID = tblScheduleDetails.courseid
GROUP BY tblSchedule.course
 
Top