Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Update Statement Error on Different SErver Communication Expand / Collapse
Author
Message
Posted Thursday, March 11, 2010 8:34 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, March 23, 2014 8:00 PM
Points: 5, Visits: 214
Update Statement Error on Different SErver Communication.

Update OPENQUERY([112.137.162.205], 'select * from [CCRSVTEam]..[tbl_SvDetails]') set dbs_UpdatedStatus = A.dbs_UpdatedStatus
from tbl_SvDetails A
inner join OPENQUERY([112.137.162.205], 'select * from [CCRSVTEam]..[tbl_SvDetails]') B
on A.dbs_Accno=B.dbs_Accno
where B.dbs_client in ('CIMBHP','HSBC','CITIBANK','CIMBRETAIL') and A.dbs_UpdatedStatus<>B.dbs_UpdatedStatus

But it is working fine in Select statement.

select A.dbs_Accno,B.dbs_Accno,B.dbs_client,A.dbs_UpdatedStatus,B.dbs_UpdatedStatus from tbl_SvDetails A
inner join OPENQUERY([112.137.162.205], 'select * from [CCRSVTEam]..[tbl_SvDetails]') B
on A.dbs_Accno=B.dbs_Accno
where B.dbs_client in ('CIMBHP','HSBC','CITIBANK','CIMBRETAIL') and A.dbs_UpdatedStatus<>B.dbs_UpdatedStatus
Order by B.dbs_client
Post #881463
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse