Solved

Column is specified more than once in the “SET” clause

Posted on 2013-10-24
9
2,341 Views
Last Modified: 2013-10-28
Hello:

Attached is an Excel workbook containing tabs of data that I need to import into SQL tables.  There is an import tool that we use, for such activity.

In particular, I'm having an issue with the tab called "EmployeeTrainingCourses".  When I conduct the import of this data directly into a SQL table, I get the error message saying that the "Column [whatever] is specified more than once in the 'SET' clause".

I read online that this is a fairly common error message.  But, I don't see anything online addressing this error in terms of importing data.

The data is just what it looks like in the spreadsheet.  I simply want to import each row as a record in the table.  It should be pretty straightforward.  So, I don't know why I'm getting this message.

Any help is appreciated.

Thanks!

TBSupport
CertsLicTrain-EHW-Employee-Templ.xlsx
0
Comment
Question by:TBSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 39596953
hi,

can you share your query with us.
between for your reference, you can check out the link.

http://exacthelp.blogspot.in/2012/04/column-name-is-specified-more-than-once.html
0
 
LVL 1

Author Comment

by:TBSupport
ID: 39596956
Hi Brichsoft:

It's select * from [spreadsheetname$]  

The import tool has a UI that allows us to map fields from the select statement into fields in the table that we're trying to import into.

TBSupport
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 39596973
is there any trigger?
0
Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

 
LVL 1

Author Comment

by:TBSupport
ID: 39596999
No.  Good question.

TB Support
0
 
LVL 5

Expert Comment

by:MohitPandit
ID: 39597076
Hello,

I just tried to import same worksheet with help of "SQL Server Import & Export Wizard" and it did not give any error. Please find attached .png file here.

BTW, which import tool is using?

Best Regards,
Mohit Pandit
Snap-01.PNG
0
 
LVL 1

Author Comment

by:TBSupport
ID: 39597127
SmartConnect.

It might be a moot point, though.  I had to get this done, ASAP, and was able to get this data imported through Microsoft Dynamics GP's Table Import tool.

I am curious, though, as to why this error comes about in SmartConnect.  Their tech support never got back to me, and I had to move forward.

TBSupport
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 39597168
hi,

problem is

either one column is inserted twice, either virtually or
or
there could be some trigger, which may affecting.

if you can share us whole error message, it help us to give reply
0
 
LVL 1

Author Comment

by:TBSupport
ID: 39598247
All of the columns get this error, but here is the one for the EmployeeID column:

The column name 'EmployeeID' is specified more than once in the SET clause. A column cannot be assigned more than one value in the same SET clause. Modify the SET clause to make sure that a column is updated only once.

TBSupport
0
 
LVL 5

Accepted Solution

by:
MohitPandit earned 500 total points
ID: 39599660
Hello,

I don't have SmartConnect.

But these type of error comes either any insert triggers applied or UPDATE with same.
Please find below links
http://social.msdn.microsoft.com/Forums/en-US/7ba617ee-eb46-4ecc-9a3b-22d1dfc5a3c3/error-msg-264-regarding-set-clause

http://exacthelp.blogspot.in/2012/04/column-name-is-specified-more-than-once.html


Best Regards
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question