Saturday, February 25, 2012

OLE DB Destination

I am proceesing a file and using a OLE Db destination for inserting the rows present into a file to the table.

As of now OLE db destination points to the table and having the fileds mapping of input column and destination column.

now i want to perform some calculation and want insert the rows into table based on the value of some other column for ex.

if (column2 == 1)

{

column1 = column4 - column5

}

if (column3== 1)

{

column1 = column4 - Column6

}

Please let me know how to do this.

Use a Derived Column transformation.

Select "Replace Column 1" as the column to work on in the lower grid, then use the conditional operator.

To just one conditional -

column2 == 1 ? column4 - column 5 : coumn1

if column2 equals 1 then result is column4 minus column5, else use current column1 value.

To do the two if clauses -

column2 == 1 ? column4 - column 5 : column3 = 1 ? column4 - column 6 : column1

|||

I have the same problem

Totally,Thanks

|||

I want to implement all this four condition in one derived column expression.

if (Column1== 1)

{

OutputColumn = ColumnA- Column1RATE
}

if (Column2 == 1)

{

OUtputColumn = ColumnA- Column2RATE
}

if (Column3 == 1)

{

OUtputColumn = ColumnA- Column3RATE
}

if (Column4 == 1)

{

OUtputColumn = ColumnA- Column4RATE
}

please suggest

No comments:

Post a Comment