access 导入 sqlserver

EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO


INSERT INTO 表名(字段1,字段2,字段3)
SELECT 字段1,字段2,字段3
FROM opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source="d:/db.mdb"').表名


GO
EXEC sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 0;

你可能感兴趣的:(access 导入 sqlserver)