[杂笔屋]OPENROWSET

 

代码
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
SELECT * into #tempxx FROM openrowset('SQLOLEDB','服务器';'登录用户';'密码','SELECT * FROM athletic.dbo.imatposcheckOnlineHD');
GO
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure 

 

 

posted @ 2010-05-04 15:14  Treenew Lyn  阅读(234)  评论(0编辑  收藏  举报