Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Update Query
06-30-2010, 04:26 PM #1
- Join Date
- Jun 2010
- Thanked 0 Times in 0 Posts
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)
07-03-2010, 08:03 PM #2
You have to tell us WHAT database you are using. The syntax for UPDATE using multiple tables is very different with different databases.Be yourself. No one else is as qualified.