I have two tables, custmast and custaddlinfo. I want to update a field in custaddlinfo, ISPIWebDirector y. Both tables have a common field, custnumber. But I want to select only the records for custaddlinfo where custmast.compan y name = "ACME" the following SQL statement works in Access but does not work in SQL Server. I get the following errors:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'INNER'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'custmast'.
Here is my command
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'INNER'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'custmast'.
Here is my command
Code:
UPDATE custmast INNER JOIN custaddldetail ON custmast.customernumber = custaddldetail.CustomerNumber SET custaddldetail.ISPIWebDirectory = "download00853_acme" WHERE (custmast.companyname="ACME") AND (custmast.customernumber Like "ACME%");
Comment