Skip to content
Advertisement

Insert CSV file to already existing table within SQL Server

I have a .csv file that I must update to my already existing table within SQL Server. Is there a query other than a BULK INSERT that I can use for this?

Here is the database and table: Backup Database – dbo.Backup$ table

Here is the sample data that is already in the dbo.Backup$ table

This is the .csv file data: (test1.csv)

Desired output:

The .csv file has the same columns. I just need to update my existing dbo.Backup$ table with the new .csv file. I am thinking I can perform a BULK INSERT command to do this, however, the column names keep importing as well.

This is what I am doing:

Advertisement

Answer

You can do OpenRowSet:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement