We were having some problems with slowness of some queries when going against linked servers and tried using open query instead of 4 part identifier to do select from linked server table. Seems to have helped in some areas but having a problem with an update query that is trying to update a table that is used in open query. This is just a quick test query to recreate problem and below that is the errors we get back. THANKS for any help!
UPDATE SQLSERVER2.Production2.dbo.labellog
set fldWork2 = fldStep,
fldWork3 = fldID
from sqlserver2.production2.dbo.dbll050
INNER JOIN OPENQUERY (SQLSERVER2, 'Select fldStep, fldID, fldWork from Production2.dbo.labellog') ON
PC_HI_ITEM_NUMBER = fldWork
Msg 209, Level 16, State 1, Line 2
Ambiguous column name 'fldStep'.
Msg 209, Level 16, State 1, Line 3
Ambiguous column name 'fldID'.
UPDATE SQLSERVER2.Production2.dbo.labellog
set fldWork2 = fldStep,
fldWork3 = fldID
from sqlserver2.production2.dbo.dbll050
INNER JOIN OPENQUERY (SQLSERVER2, 'Select fldStep, fldID, fldWork from Production2.dbo.labellog') ON
PC_HI_ITEM_NUMBER = fldWork
Msg 209, Level 16, State 1, Line 2
Ambiguous column name 'fldStep'.
Msg 209, Level 16, State 1, Line 3
Ambiguous column name 'fldID'.