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
,免备案空间,网站空间,美国服务器
全网最新最细最实用WPS零基础入门到精通全套教程!带你真正掌握WPS办公! 内含Excel基础操作、函数设计、数据透视表等
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号