Import data from multiple excel to multiple tables using SSIS | Part 8

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024
  • Import data from multiple excel to multiple tables using SSIS:
    Requirement:
    1) SQL Server Data Tools for Visual Studio 2015
    or
    SQL Server Data Tools or Visual Studio 2019
    2) and SQL Server instance
    3) Multiple excel sheet.
    For this we use conditional split component. Let us see the below example:
    SSIS Conditional Split Transform task component is split data into multiple destinations based on the specified conditions.
    CREATE TABLE [Employee_Delhi](
    [empid] [int] NULL,
    [emp_name] [nvarchar](255) NULL,
    [emp_location] [nvarchar](255) NULL,
    [salary] [float] NULL
    ) ON [PRIMARY]
    Point to be Noted:
    Now setting the expression of excel connection Manager so that in a folder all files will be available to import the data in SQL.

ความคิดเห็น • 2

  • @mdadilkhan1837
    @mdadilkhan1837 11 หลายเดือนก่อน

    Hi Syed, if suppose in a single sheet we have delhi, mumbai and punjab data then how to read the data and sent it to different tables.

    • @SyedAliM
      @SyedAliM  11 หลายเดือนก่อน +1

      you can use Conditional Split in SSIS,
      Step 1: Take the excel data source and configure it data connection.
      Step 2: Take the Conditional Split and use in condition emp_location == "Delhi"
      for case 1 and emp_location == "Mumbai" for case 2.
      Step 3: take two oledb , one for panjab and other for delhi and map it.
      and run the project and data will transfer into two different table.