Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Import Records from a Excel Spreadsheet into SQL Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-09-12 : 18:35:44
MadMand writes "Hi guys,

I have the following scenario:

I would like to import records from a Excel Spreadsheet into SQL Server 2005 but ONLY update the records in the tables if the record DOES NOT exists OR has changed...

Currently what the Import / Export wizard does, it duplicates every record that already exists in the table and then adding the new ones..

Any ideas? help?

Will be kindly appreciated..

MadMan"

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-09-12 : 19:36:28
quote:
Originally posted by AskSQLTeam

MadMand writes "Hi guys,

I have the following scenario:

I would like to import records from a Excel Spreadsheet into SQL Server 2005 but ONLY update the records in the tables if the record DOES NOT exists OR has changed...

Currently what the Import / Export wizard does, it duplicates every record that already exists in the table and then adding the new ones..

Any ideas? help?

Will be kindly appreciated..

MadMan"



Import the data into a table different than the final target table, and then use an insert and update statement tp to insert and update the data in the target table.


CODO ERGO SUM
Go to Top of Page
   

- Advertisement -