Design an SSIS package to load the CSV file data into a stage table and process the new data into your target table.
You have a few options to import your CSV into your stage table. For example, import from flat file to OLE DB target inside SSIS with Data flow task, use T-SQL to Buil Insert, or bcp...... Any method that fit your need.
You can schedule an agent job to run your SSIS package at your time you choose.
i need to append / insert new data to the table , here the new data comes in the form of CSV daily at 8 AM, please guide to append/ insert the new data, i tried bulk inserting
I had created a table in ms sql with nearly 50 rows in it , i need to append / insert new data to the table , here the new data comes in the form of CSV daily at 8 AM, please guide to append/ insert the new data, i tried bulk inserting but it gave me error as
"Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)". #408"
SQL Server Reporting Services
SQL Server Integration Services
SQL Server Analysis Services
SQL Server Other
2 answers
Sort by: Most helpful
-
Jingyang Li 5,896 Reputation points Volunteer Moderator
2022-12-15T20:16:07.117+00:00 -
ZoeHui-MSFT 41,491 Reputation points
2022-12-16T01:19:38.477+00:00 You may use SSIS to load csv file to SQL Server data and then use sql agent job to schedule the package daily after 8 AM.
Reference here:
https://blog.sqlauthority.com/2011/05/12/sql-server-import-csv-file-into-database-table-using-ssis/
If the csv file name will change every day, you may use script task as said here.
Please also refer to 3-easy-ways-to-import-csv-file-to-sql-server for other ways.
Regards,
Zoe Hui
If the answer is helpful, please click "Accept Answer" and upvote it.