user138957
user138957

Reputation: 259

Implement a sql query to ssis

I have googled,for along time in order to find solution to implement a sql server query to ssis

SELECT
    Sales_Order_Number,company_code,isnull(
    (
        SELECT
            distinct Description + ';' AS 'text()'
        FROM
            dbo.l_Fact_Orders as xml
            INNER JOIN dbo.Tbl_Dim_ItemSOA items ON items.Item_SOA_ID=xml.Item_SOA_ID
        WHERE
            xml.Sales_Order_Number = myTable.Sales_Order_Number
            and xml.company_code = myTable.company_code 
        FOR
            XML PATH('')
    )
    ,'') as Description
FROM
    dbo.l_Fact_Orders myTable
GROUP BY
    Sales_Order_Number,company_code

I am looking for ideas please.

Upvotes: 0

Views: 58

Answers (1)

Yasskier
Yasskier

Reputation: 811

It is bit unclear what you want to do with this query, but I believe that you want to simply get the columns from the query and do something with them?

  1. Drag a "Data Flow Task" to your package

  2. Open the Data Flow, add "OLE DB Source" and click on it

  3. If you haven't created OLE DB connection before, click "New" near the connection manager, otherwise select the connection from the dropdown list

  4. In "Data access mode" select "SQL Command"

  5. Paste your command below

enter image description here

Upvotes: 1

Related Questions