I'm using Microsoft SQL Server and when writing this code I am getting an incorrect syntax error for the "Inner" and also "=" within the SET line. I've looked into this and think everything is set up correctly, can someone point out why if possible?
USE [db1]
GO
UPDATE a.[table1]
INNER JOIN a.[table1] = a.[table2]
ON a.[table1].[field1] = a.[table2].[field1]
SET [field2] = a.[table2].[field2]
WHERE [ID] IN (SELECT #TempTable.[ID] FROM #TempTable)