數據導入到已存在的excel表格中

--這些語句是不能夠一起執行的哦,在2008上測試沒有問題,但是在2000上不知道會怎麼樣呢?

exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure


insert into ERP_DB
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="d:/11.xls";User ID=;Password=;Extended properties=Excel 5.0')...[data_input$]
 where SC_ZDRQ is not null


exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure

發佈了32 篇原創文章 · 獲贊 11 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章