>  기사  >  데이터 베이스  >  Insert data from excel to database

Insert data from excel to database

WBOY
WBOY원래의
2016-06-07 17:40:471096검색

USE ESPATruncate table dbo.Interface_Customer--Delete the table data but retain the structureexec sp_configure "show advanced options",1reconfiguregoexec sp_configure "Ad Hoc Distributed Queries",1reconfigure go--Open peripheral component


USE ESPA Truncate table dbo.Interface_Customer --Delete the table data but retain the structure exec sp_configure "show advanced options",1 reconfigure go exec sp_configure "Ad Hoc Distributed Queries",1 reconfigure go --Open peripheral component and service related to data imput and export INSERT INTO Interface_Customer (Cust_Code,Cust_Name, Src_Sys_Code,Currency,Customer_group) SELECT Cust_Code, [Cust_Name ( Chinese)], Src_Sys_Code, Currency, [Customer group] from OPENDATASOURCE ('Microsoft.ACE.OLEDB.12.0','Data Source="E:\eSPA_database\eSpa2_Test_data-Product.xls";Extended properties=Excel 8.0')...sheet1$ --Insert data from excel to database exec sp_configure "Ad Hoc Distributed Queries",0 reconfigure go exec sp_configure "show advanced options",0 reconfigure go ,免备案空间,网站空间,美国服务器

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
이전 기사: C# SqlServer的Helper基类다음 기사: 基础SQL语句