Solved

How do I append a SQL table with an excel worksheet

Posted on 2011-02-11
3
298 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
3 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 250 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 250 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PERFORMANCE OF SQL QUERY 13 73
How to simplify my SQL statement? 14 54
View SQL 2005 Job package 16 43
Please help for the below sql query. 1 24
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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