Attempt to run cross-server update:
UPDATE ASILIVE.CustomerManagementSystem.dbo.Sessions SET ASILIVE.CustomerManagementSystem.dbo.Sessions.VarianceAmount=Variances.VarianceAmount FROM ASILIVE.CustomerManagementSystem.dbo.Sessions INNER JOIN Variances ON ASILIVE.CustomerManagementSystem.dbo.Sessions.SessionGUID = Variances.SessionGUID WHERE ASILIVE.CustomerManagementSystem.dbo.Sessions.VarianceAmount <> Variances.VarianceAmount
Gives an error:
Msg 117, Level 15, State 2, Line 5 The number name 'ASILIVE.CustomerManagementSystem.dbo.Sessions' contains more than the maximum number of prefixes. The maximum is 3.
What gives?
see also
Unimportant research:
I tried randomly aliasing s :
UPDATE ASILIVE.CustomerManagementSystem.dbo.Sessions s SET s.VarianceAmount=Variances.VarianceAmount FROM ASILIVE.CustomerManagementSystem.dbo.Sessions s INNER JOIN Variances ON s.SessionGUID = Variances.SessionGUID WHERE s.VarianceAmount <> Variances.VarianceAmount
But this does not work:
Msg 117, Level 15, State 2, Line 5 The number name 'ASILIVE.CustomerManagementSystem.dbo.Sessions' contains more than the maximum number of prefixes. The maximum is 3.
Hamlin suggested adding brackets:
UPDATE [ASILIVE].[CustomerManagementSystem].dbo.Sessions SET [ASILIVE].[CustomerManagementSystem].dbo.Sessions.DisciplineVarianceAmount=DisciplineVariances.VarianceAmount FROM [ASILIVE].[CustomerManagementSystem].dbo.Sessions INNER JOIN DisciplineVariances ON [ASILIVE].[CustomerManagementSystem].dbo.Sessions.SessionGUID = DisciplineVariances.SessionGUID WHERE [ASILIVE].[CustomerManagementSystem].dbo.Sessions.DisciplineVarianceAmount <> DisciplineVariances.VarianceAmount
but this does not work:
Msg 117, Level 15, State 2, Line 5 The number name 'ASILIVE.CustomerManagementSystem.dbo.Sessions' contains more than the maximum number of prefixes. The maximum is 3.
source share