SSIS OLEDB destination with SQL command
Asked Answered
T

1

10

I have a simple SSIS package with a data flow task with ADO.NET source & destination:

enter image description here

Normally, I would just select 'table or view' on the OLEDB destination, but although the connection is correct it's not showing me any table names.

So: I have to use SQL command to insert rows in the OLE DB destination. That destination is a DB2 database.

My question: how can I write this sql statement to insert everything from the ANO NET source into the destination table? enter image description here

Term answered 17/6, 2013 at 9:32 Comment(0)
S
14

In the SQL Command Text, Just write

SELECT * FROM TableName --Here tablename is the destination table name.

And go to the Mapping and map the appropriate columns if it is not already mapped.

Squander answered 17/6, 2013 at 9:35 Comment(3)
totally not logical if you think about it, but simple & it works :)Term
@Term the SELECT command in this case is not to retrieve data but to retrieve columns metadata from the query result.Seafowl
And how would you add "Keep identity" option in SQL command?Kantos

© 2022 - 2024 — McMap. All rights reserved.