I am trying to update database fields from one SQL Server table to another.
Our production SQL Server is [spdbprod.test.com\\spprod]
, our QA server is
You are using table alias in a wrong way. You cannot do UPDATE table1 t SET field1=val
, you have to write UPDATE table1 SET field=val
(Or UPDATE table1 SET field=val FROM table1 t
). So change your query to
UPDATE [spdbprod.test.com\spprod].[aspnetdb].[dbo].[Communities_Groups]
SET Show = t2.show
FROM [spdbprod.test.com\spprod].[aspnetdb].[dbo].[Communities_Groups] t1
INNER JOIN [spdbQA.test.com\spQA].[aspnetdb].[dbo].
[Communities_Groups] t2 ON (t1.GroupID = t2.GroupID)