Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I append a SQL table with an excel worksheet

Posted on 2011-02-11
3
Medium Priority
?
325 Views
Last Modified: 2012-06-27
I have a SQL table named EMPLOYEES which includes a primary key field named REF_ID (automatically assigned when a new record is created) and a BADGENUMBER field.

I need to append the data from an excel file named NEWHIRES, without adding any duplicates(rows where the data in the BADGENUMBER field already exists in the table.

Thanks
0
Comment
Question by:kimberlys777
[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
3 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 750 total points
ID: 34876131
standard technique would be to have a sql server job to import the spreadsheet into
a work table, and then rename/archive the spreadsheet....

then a second step would process the new data from the work table into the main system...

then a third step would deal with any clashes,... report them

and tidy up the work table ready form the next process... (delete the read in data etc,,,/ archive any errors...)

hth
0
 
LVL 21

Assisted Solution

by:Jason Yousef, MS
Jason Yousef, MS earned 750 total points
ID: 34913003
Hi Kim,

Do you need a solution using SSIS?  that would be the easiest and the fastest way.
Please let me know, I could help in that..

Jason

0
 

Author Closing Comment

by:kimberlys777
ID: 35398114
I was able to come up with a work-around
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

609 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