Insert data from excel to database
Jun 07, 2016 pm 05:40 PMUSE 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
,免备案空间,网站空间,美国服务器

인기 기사

인기 기사

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제









