数据库跨服务器查询

insert into BorrowApplicationInfo

(id,devicenum,classnum,devicename,typename,norm,getperson,gettime,statecode,usedirection,use

company)
Select * FROM
OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel

8.0;Database=E:\collegemis\Upexcel\FileName.xls;HDR=YES', 'SELECT * FROM [FileName$]')

 

 

如果无法连接数据,则需打开数据库的权限

 

exec sp_configure 'show advanced options',1

 

reconfigure

 

exec sp_configure 'ad hoc distributed queries',1


reconfigure

你可能感兴趣的:(Microsoft,Excel)