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

Ganesh Babu Kondiboyina 1 Reputation point
2022-12-15T11:41:08.193+00:00

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 Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,344 questions
SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Jingyang Li 5,896 Reputation points Volunteer Moderator
    2022-12-15T20:16:07.117+00:00

    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.

    0 comments No comments

  2. ZoeHui-MSFT 41,491 Reputation points
    2022-12-16T01:19:38.477+00:00

    Hi @Ganesh Babu Kondiboyina ,

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.