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
Solved

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

Posted on 2013-10-24
9
2,292 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
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

792 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