Reputation: 13
I have provided below if condition in update if block. I am getting error: data flow expression should return Boolean. iif(Column_8 == 'Automática','Automatic','Manual')
I tried updating rows present in a column based on a condition.
Upvotes: 1
Views: 587
Reputation: 6104
You have to specify only condition in the alter row update if i.e., there has to be a Boolean value for these fields. The expression that you have used returns a string value and hence the error.
I have taken the following data in my table:
iff
condition.iif(col1=='Automática','Automatic','Manual')
Update if
will update the entire sink row based on the source row data (after checking the condition given in alter row). It would not update from any foreign value (as you have tried). So, using the following post SQL scripts to update the values as per requirement.Update demo set col1='Manual' where col1!= 'Automática';
Update demo set col1='Automatic' where col1='Automática';
Upvotes: 1