Solved

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

Posted on 2013-10-24
9
2,119 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
  • 4
  • 3
  • 2
9 Comments
 
LVL 19

Expert Comment

by:Bhavesh Shah
Comment Utility
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
Comment Utility
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
Comment Utility
is there any trigger?
0
 
LVL 1

Author Comment

by:TBSupport
Comment Utility
No.  Good question.

TB Support
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 5

Expert Comment

by:MohitPandit
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now