I need to import excel files into SQL server 2008 SSMS manually and only load those items into the database which are new not the existing ones. please find me SQL Query for the same.
Asked
Active
Viewed 124 times
2 Answers
1
I would suggest that you can use SSIS in this situation. I guess there is no straight forward query to handle this situation. First you need to load data into the staging table and then you have to move the new records only. Please refer here for T-SQL command Import Excel spreadsheet columns into SQL Server database
-
good and detailed answer.. upvote! – Shezi Jul 16 '12 at 07:09
0
You can use OPENROWSET function shown here http://beyondrelational.com/modules/2/blogs/70/posts/10846/export-to-excel-with-column-names.aspx
Madhivanan
- 13,244
- 1
- 23
- 28