home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / Code / ch39 / sql_queries.txt < prev    next >
Encoding:
Text File  |  1997-09-21  |  611 b   |  12 lines

  1. ****Query 1 û Using the "Join" Syntax****
  2. SELECT Category.Name, Course.Number, Course.Title,
  3. IIf([Cost]>0,Format([Cost],"Currency"),"-") AS CourseCost,
  4. Format([Start_Date],"mmm d"", ""yy") & 
  5. IIf([End_Date]<>[Start_Date]," to " & Format([End_Date],"mmm d"", ""yy"),"") AS DateRange
  6. FROM (((Schedule INNER JOIN Course ON 
  7. Schedule.Course_Id = Course.Id)
  8. INNER JOIN Instructor ON Schedule.Instructor = Instructor.Id)
  9. INNER JOIN Location ON Schedule.Location = Location.Id)
  10. INNER JOIN Category ON Course.Category = Category.Id
  11. WHERE (((Schedule.Start_Date)>Now()))
  12. ORDER BY Category.Name, Course.Number;