问题描述
我想将excel数据导入sql-2005表中.
我知道如何使用GUI进行操作,但是我面临的问题是我在表中定义了一个主键,因此当我从excel导入数据时,如果它具有重复数据,则由于主键而失败.
否则,它将成功导入.
所以我想编辑excel文件中的记录并在excel中添加新记录.
如果进行了编辑,我希望在导入过程中在table(sql)中对其进行更新,否则,我希望在导入过程中将记录插入到table(sql)中.
我该怎么做.
I want to import excel data into sql-2005 table.
I know how to do it with GUI but the problem I am facing is I have a primary key defined in my table hence when I import data from excel if it has duplicate data it fails due to primary key.
Otherwise it imports successfully.
So I want to edit records in excel file and add new records in excel.
If edited, I want it to be updated in table(Sql) during import process, otherwise I want the record to be inserted in table(sql) during import process.
How can I do this.
推荐答案
这篇关于将数据从Excel导入Sql-2005数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!