How do I append a SQL table with an excel worksheet

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
kimberlys777Asked:
Who is Participating?
 
LowfatspreadConnect With a Mentor Commented:
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
 
Jason Yousef, MSConnect With a Mentor Sr. BI  DeveloperCommented:
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
 
kimberlys777Author Commented:
I was able to come up with a work-around
0
All Courses

From novice to tech pro — start learning today.