Can someone please tell me why this doesn't work? *'s replace actual secured values.
The query will update the EUDLoadDt fine, but never changes the value of the two other fields, both which are bit fields on both servers and both tables.
If I change the update, to a definitive value, say:
ExceptionRanked = 1,
Instead of:
ExceptionRanked = a.XCP_RNK_IR,
All the columns get updated with a 1. However it won't set them equal to each other...
I also tried this:
ExceptionRanked = CASE WHEN a.XCP_RNK_IR = 1 THEN 1 ELSE 0 END,
Which didn't work either...
I'm getting extremely frustrated and can't figure out what is going wrong...
Code:
UPDATE OPENDATASOURCE('SQLOLEDB','Data Source=*.*.*.*;User ID=*;Password=*').*.dbo.*
SET ExceptionRanked = a.XCP_RNK_IR,
SelectionFlg = a.SLE_IR,
EUDLoadDt = GETDATE()
FROM TADMSMT a INNER JOIN OPENDATASOURCE('SQLOLEDB','Data Source=*.*.*.*;User ID=*;Password=*').*.dbo.* b ON a.ID = b.ID
SELECT a.ID, b.ID, ExceptionRanked, a.XCP_RNK_IR,
SelectionFlg, a.SLE_IR,
EUDLoadDt, GETDATE()
FROM TADMSMT a INNER JOIN OPENDATASOURCE('SQLOLEDB','Data Source=*.*.*.*;User ID=*;Password=*').*.dbo.* b ON a.ID = b.ID
The query will update the EUDLoadDt fine, but never changes the value of the two other fields, both which are bit fields on both servers and both tables.
If I change the update, to a definitive value, say:
ExceptionRanked = 1,
Instead of:
ExceptionRanked = a.XCP_RNK_IR,
All the columns get updated with a 1. However it won't set them equal to each other...
I also tried this:
ExceptionRanked = CASE WHEN a.XCP_RNK_IR = 1 THEN 1 ELSE 0 END,
Which didn't work either...
I'm getting extremely frustrated and can't figure out what is going wrong...