从Excel导入到SQL Server 2005 [英] import from excel to sql server 2005

查看:116
本文介绍了从Excel导入到SQL Server 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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


INSERT INTO [sqlDb].[dbo].[pages]([page_title],[model_name],[page_num])

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=C:\MF 240\Excel file\b.xls;IMEX=1;HDR=YES','select [Sub Group Name],[Model],[pagenum] from [Sheet1$]')


我一直在尝试使从excel导入到sql server的工作已经有一段时间了,但是没有成功.即使我的数据库表列名完全相同,它仍然给我这个错误.我尝试了各种调整,但仍然会产生问题.


i have been trying to make this import from excel to sql server work for some time now but with no success. it keeps giving me this error even though my database table column name is exactly the same . i have tried various tweaking but still its giving problem.

Msg 207, Level 16, State 1, Line 5
Invalid column name 'page_title'.


我有SQL Server的快速版,因此导入导出向导甚至都无法正常工作,也无法让DTS工作..因此,任何提示信息都将非常感谢...


i have express edition of sql server so the import export wizzard is not even working nor could i get the dts working .. so any headsup would be great thank you ...

推荐答案

')


我一直在尝试使从excel导入到sql server的工作已经有一段时间了,但是没有成功.即使我的数据库表列名完全相同,它仍然给我这个错误.我尝试了各种调整,但仍然会产生问题.


i have been trying to make this import from excel to sql server work for some time now but with no success. it keeps giving me this error even though my database table column name is exactly the same . i have tried various tweaking but still its giving problem.

Msg 207, Level 16, State 1, Line 5
Invalid column name 'page_title'.


我有sql server的快速版,所以导入导出向导甚至都无法正常工作,也无法让dts正常工作..因此,任何提示都将非常感谢...


i have express edition of sql server so the import export wizzard is not even working nor could i get the dts working .. so any headsup would be great thank you ...


尝试
read-import-excel-file [ ^ ]
将数据从Excel或使用TSQL脚本从Access导入到SQL Server [
Try
read-import-excel-file[^]
Import Data to SQL Server from Excel or Access using TSQL Script[^]


要加倍检查数据库中的表pages是否包含名为page_title的列?例如,列名不是t Page_Title.
Have you double checked that the table pages in your database contains a column named page_title? For example that the column name isn''t Page_Title.


这篇关于从Excel导入到SQL Server 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆