| SQL |
SELECT
DISTINCT courseID AS id
,
catalogNumberPrefix, classID, title,
registrationcutoffdate, startdate, enddate,
city, state, zip,
maxStudents, isFull, isCancelled,
semester, price, classprice, creditHours,
day(registrationcutoffdate) as regCutoffDay,
month(registrationcutoffdate) AS regCutoffmonth,
year(registrationcutoffdate) as regCutoffYear,
day(startdate) as startday, month(startdate) AS startmonth, year(startDate) as startYear,
day(enddate) as endday, month(enddate) AS endmonth, year(enddate) as endYear,
isScheduled, ce.briefDescription
FROM vCourseSchedule
LEFT OUTER JOIN courseExtras ce on vCourseSchedule.courseID = ce.cid
WHERE
(
isCancelled != 1
AND
courseID IN (536,346,1996,2207,526,1297,1896,1895,1997,1994,2103,418,2110,2097,35,2281,1783,1395,900,309)
)
ORDER BY
catalogNumberPrefix, title, startdate |