Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3022
  • Last Modified:

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

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
TBSupport
Asked:
TBSupport
  • 4
  • 3
  • 2
1 Solution
 
Bhavesh ShahLead AnalysistCommented:
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
 
TBSupportAuthor Commented:
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
 
Bhavesh ShahLead AnalysistCommented:
is there any trigger?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
TBSupportAuthor Commented:
No.  Good question.

TB Support
0
 
MohitPanditCommented:
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
 
TBSupportAuthor Commented:
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
 
Bhavesh ShahLead AnalysistCommented:
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
 
TBSupportAuthor Commented:
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
 
MohitPanditCommented:
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now