tags:

views:

126

answers:

3

Is there a way to map to the same input column to multiple parameters in the OLEDB Command object, or to multiple 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.

A: 

Not with OLEDB AFAIK.

FinnNk
A: 

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.

James Wiseman
A: 

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 :)

Faiz

related questions