EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE
GO

update t_csi set collectStatu='1' where csinumber in(
SELECT   csinumber
FROM      OPENDATASOURCE(
         'SQLOLEDB',
         'Data Source=***-server;User ID=sa;Password=sa'
         ).ylbx.dbo.t_csi where collectStatu='1')
GO

 

 

select * from t_person where P_Name ='葛香芬' select * from T_DataPhoto where PersonID=101270

begin tran update T_DataPhoto set Data=b.data,  Data_All=b.data_all from( select * from OPENDATASOURCE(          'SQLOLEDB',          'Data Source=zdyf-s-0103;User ID=sa;Password='          ).ylbx.dbo.t_dataphoto where personid=10077          )b          where T_DataPhoto.PersonID=101270                   rollback

相关文章:

  • 2022-12-23
  • 2021-04-28
  • 2022-12-23
  • 2021-09-04
  • 2021-11-05
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2021-11-09
  • 2021-07-15
  • 2021-11-15
  • 2021-09-21
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案