I am trying to match to 2 fields on the same table, but the selection criteria is located on another table.
You will see that I am trying to match what the customer has paid (cenPaid) against what the cost is (cenCost) to remove the person from default.
The criteria for this matching up is the course start date Courses.crsFirstSession). I am sure it is very simple, But I just dont know how else to write this.
Any help will be appreciated
Thanks in advance
SET cenCost = cenPaid
WHERE (Courses.crsFirstSession < CONVERT(DATETIME, '2008-04-01 00:00:00', 102))
FROM Enrolments INNER JOIN Courses ON Enrolments.cenVenue = Courses.crsVenue AND Enrolments.cenGroupCode = Courses.crsGroupCode AND
Enrolments.cenCode = Courses.crsCode AND Enrolments.cenCourseOrSes = Courses.crsCourseOrSes)