[dba-SQLServer] How do I create an update query with a join

Klos, Susan Susan.Klos at fldoe.org
Fri Apr 1 14:04:03 CST 2005


I tried this (which I got from Access):

UPDATE tblMembership05 

INNER join tblCorrections05 

ON (tblMembership05.StudentID = tblCorrections05.SID) 

AND (tblMembership05.SchlNo = tblCorrections05.SchlEnrl) 

AND (tblMembership05.DistrictNo = tblCorrections05.DistEnrl) 

SET tblCorrections05.PassFCATMathdt = Null

WHERE (((tblMembership05.MMetGradflg)="1"))

 

I get this error:

Server: Msg 156, Level 15, State 1, Line 2

Incorrect syntax near the keyword 'INNER'.

Server: Msg 170, Level 15, State 1, Line 7

Line 7: Incorrect syntax near 'tblMembership05'.

 

Any help will be greatly appreciated.

 

Susan Klos

Senior Database Analyst

Evaluation and Reporting

Florida Department of Education

850-245-0708 

sc 205-0708

 




More information about the dba-SQLServer mailing list