想你了的他他 发表于 2016-11-9 06:33:26

SQL OPEN Query Sample

select * from emp.dbo.users where status='A' and empType = 'PeopleSoft' and empid not in (
select empid from OPENQUERY(Linked_SERVER_NAME, 'SELECT empid FROM CorporateDir C , Location_Info L where C.status="A" and C.empType="PeopleSoft" and C.locationID=L.location and L.country="USA";'));

查看LINKED_SERVER_NAMME:
SQLSERVER企业管理器 ---> 控制台 ---> SQL Server group
          ---> Database--->Security--->Linked Servers.
页: [1]
查看完整版本: SQL OPEN Query Sample