关于excel,access里的内容导到sqlserver数据库的问题?

用SQL语句直接导入比较方便,快捷

1.查询excel
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
  'Data Source="c:/Finance/account.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions

2.导入
insert into table1(field1, field2, field3, field4, field5)
SELECT a1, a2, a3, a4, a5
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
  'Data Source="c:/Finance/account.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions

insert  into  B表  selet  *  from  openrowset('Microsoft.Jet.OLEDB.4.0',   
     'x:/A.mdb';'admin';'',A表)

select * into aaa from opendatasource('Microsoft.Jet.OLEDB.4.0',
 'Data Source="e:/ccc.mdb")...table

 

上一篇:WeGene:存储、传输、计算巧实现,基因数据上云不再难


下一篇:写给自己看的Linux运维基础(三) - Mono