I am using SQL Server (and Oracle as a linked Server).
The task involves updating the SQL Server table with any new changes to the column NAME in the Oracle TABLE.
EMP is PK and NAME is the column that can change.
ORACLE TABLE = TABLE1:
EMP NAME
-------------------- --------------------
1 JOE
2 David
3 BOB
SQL SERVER TABLE = TABLE1:
EMP NAME
-------------------- --------------------
1 JOE
2 David
3 FRED
Code which is not working (runs and runs w/o updating):
UPDATE OC
SET OC.NAME = MS.NAME
FROM OPENQUERY(ORCL12,
'select EMP, NAME from TEST1') OC
INNER JOIN [dbo].[TEST1] MS
ON MS.EMP = OC.EMP