How to load Query results into SSIS Package

  • I have a query where it returned results with all the views inner joined.

    I want to create a package and bring this results over into staging table.

    and at last stage I want to load this staging data into main table.

    What are the steps to create package for this?

  • Start with a data flow task. Open this >

    If you are joining on tables already in a SQL Server database then you will simply use that same SQL statement as your source >>

    Drag and drop a OLE DB source. Open it, Here instead of selecting a table ...choose 'SQL command' in the data access mode drop down control. Copy your code to here.

    Drop a OLE DB destination.

    Connect the arrow. Be sure to map the columns. Be mindful of data types.

    How many rows are you bringing over?

    ----------------------------------------------------

  • After this step I am sure you can configure the next data flow task in the control flow, to move from staging to your destination table. Though part of the purpose of staging is preparedness of some sort. Will you be doing any manipulation on the data you enter into the staging table?

    ----------------------------------------------------

  • You're using T-SQL for the query. Why do you think you need SSIS to bring the results into a staging table?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply