0
UPDATE
    TrackerNew.dbo.UnitCoreDetails 
SET
    [TrackerNew].[dbo].[UnitCoreDetails].Customer = [Tracker].[dbo].[UnitCoreDetails].Customer

FROM
    Tracker.dbo.UnitCoreDetails s
INNER JOIN
    [TrackerNew].[dbo].[UnitCoreDetails] i
ON
    i.[Serial] = s.[Serial]

This query results in the above error.

I thought it may be an alias problem but it does not seem to be, I have assigned aliases in the join and from clauses. Can anyone help?

redned
  • 301
  • 1
  • 3
  • 21
  • possible duplicate of [Update a table using JOIN in SQL Server?](http://stackoverflow.com/questions/1604091/update-a-table-using-join-in-sql-server) – Steph Locke May 07 '14 at 14:29

1 Answers1

1

you do not want to fully qualify the column that you are updating:

UPDATE
    i 
SET
    Customer = s.Customer
FROM
    [TrackerNew].[dbo].[UnitCoreDetails] i
INNER JOIN
    Tracker.dbo.UnitCoreDetails s
ON
    i.[Serial] = s.[Serial]
Brett Schneider
  • 3,993
  • 2
  • 16
  • 33