Andy DBA (11/12/2013)
WHERECourseCompleted.CourseId IS NULL
AND CourseCompleted.DateComplete >= '1/1/2013' --Failed attempt to list all courses missed this year
I remember learning that lesson too. Before I knew I could add it to the ON clause, I always solved this type of query with
WHERECourseCompleted.CourseId IS NULL
AND ISNULL(CourseCompleted.DateComplete,'12/31/2012') >= '1/1/2013'
I was so happy the day I discovered that I could utilize the ON clause. 😛