I only need the first date not all 3

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top