SSIS Parameter mapping
Is there a way to map to the same input column to multiple parameters in the OLEDB Command object, or to multipl开发者_Python百科e destination columns in the OLE Destination object?
Do I have to make a a copy of the source column with a different name to do this? That seems so...lame.
When I need to do an update like this
Update MyTable set foo = ? where foo < ?
and use the same input column for both places, I can't seem to do it unless I a create a copy of the input column and pass two different sources columns to two different parameters.
(I know this post is old but I landed here looking for the answer)
I had this issue and been able to map the parameter using name. In my case I was connecting to Oracle.
DELETE table1
WHERE table1.id = :ID_NBR
AND table1.id NOT IN (SELECT table2.id
FROM table2
WHERE table2.id = :ID_NBR)
I didn't try with SQL SERVER, but I'd think it would work with @ID_NBR parameters.
You could always put in a data transformation component in between your source and destination, and map the column you want to the same data type.
I think this is possible. If you open the advanced editor dialog and go to last tab (I don't have BIDS in my PC, I need to make some guesses about GUI) there is a section to configure output columns and there you can create a new duplicate column with its mapped to the same source as that of your original column. In the destination task you can map the duplicate column to the required one.
But there is no way you can do this without a copy of the column. It is just you don't have to create a derived column using a separate construct. But if it is ODBC, you can use the parameter name for mapping (instead of parameter position like 0,1,2,..) and there you will not have issues, AFAIK :)
Not with OLEDB as far as I know.
精彩评论