--將資料匯入到臨時表#packageinfo裡面
select * into #packageinfo from
openrowset('microsoft.jet.oledb.4.0'
,'excel 5.0;hdr=yes;database=g:\packageinfo.xls',sheet1$)
--將臨時表裡面的資料匯入到packageinfo
insert into packageinfo select * from #aa
--刪除臨時表
drop table #packageinfo
exec sp_configure 'show advanced options', 1
go reconfigure
go exec sp_configure 'ad hoc distributed queries', 1
go reconfigure
go
SQL語句導EXCEL到資料庫
select into table1 from openrowset microsoft.jet.oledb.4.0 excel 5.0 hdr yes database c 客戶資料 xls sheet1 匯入到資料庫中並且建立臨時表 用這條語句將所有工作簿的excel資料匯入到excel 如果出...
sql語句將excel資料匯入到表
訪問外部資料時,opendatasource的使用範例 注意 sql2000預設是啟用opendatasource功能的。但sql2005是預設不啟用的。如果在sql2005中要使用opendatasource,則需要先開啟。開啟方式 方式一 手工修改sql配置 在sql2005的配置工具 sql ...
java poi技術將Excel檔案內容匯入資料庫
最近在做檔案 poi解析excel 檔案步驟 1.獲取excel檔案的資料流 2.建立hssfworkbook 物件 3.然後就是獲取sheet物件,4.最後就是解析sheet物件內的相關資料,public list readexceltitle inputstream is catch ioexc...