I want to update a table in one database, based on an INNER JOIN with a table in another database. I can do this in Access, but SQL is having problems with my syntax. Can anyone point me in the right direction??
The error message I receive is..
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'INNER'.
Here is my statement:
UPDATE Licensed_PCs INNER JOIN [HardwareDB].[dbo].[Hardware]
ON Licensed_PCs.MachineID = [HardwareDB].[dbo].[Hardware].[MachineID]
SET Licensed_PCs.ActualDepartment = [HardwareDB].[dbo].[Hardware].[Department]
Thanks in advance.
The error message I receive is..
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'INNER'.
Here is my statement:
UPDATE Licensed_PCs INNER JOIN [HardwareDB].[dbo].[Hardware]
ON Licensed_PCs.MachineID = [HardwareDB].[dbo].[Hardware].[MachineID]
SET Licensed_PCs.ActualDepartment = [HardwareDB].[dbo].[Hardware].[Department]
Thanks in advance.