IF... ELSE statement can be used writing T-SQL. But when It comes to SSIS, we can assign the condition using DERIVED COLUMN TRANSFORMATION to achieve this.
Here I'm having a condition, That if one of column in a table is having "US", Then I need to update other column as "YES" and if its not "US", then I need to update it as "NO".
So for this situation, I need to have IF ELSE statement but I'm using DERIVED COLUMN Tx for this purpose.
Condition I'm quoting is as follows:
COUNTRY == "US" ? "YES" : "NO".
This means, When Country column is US, then YES, else NO..
In DERIVED COLUMN Tx, we can mention column name where we need to pass this YES and NO at the place derived column name slot and if we need to replace other column also, we have a option called derived column.
Here I'm having a condition, That if one of column in a table is having "US", Then I need to update other column as "YES" and if its not "US", then I need to update it as "NO".
So for this situation, I need to have IF ELSE statement but I'm using DERIVED COLUMN Tx for this purpose.
Condition I'm quoting is as follows:
COUNTRY == "US" ? "YES" : "NO".
This means, When Country column is US, then YES, else NO..
In DERIVED COLUMN Tx, we can mention column name where we need to pass this YES and NO at the place derived column name slot and if we need to replace other column also, we have a option called derived column.
Comments
Post a Comment