I have a table that among other fields, has the following.
I has an ETL on SSIS package that reads from this table these two fields and many others. How can I do so that before writing on the final table, for every row where Cod_Cliente is 1111111 I replace the Cliente value to "Trial"?
My initial thought was to create a derived column tool to create a new column with logic to just copy values unless I have the mentioned Code, in which case I add the "Trial" text, but I was wondering if there is a more efficient way to update the value on the go.
1条答案
按热度按时间lh80um4z1#
Knowing only what you've shared, my approach would be to fix the data as you query it from the source table
That way, everything is set before it hits the pipeline.
If you want to go with a derived column, I prefer a new column over updating existing as it makes it easier for me to debug. Either way, the expression would be something like (case sensitive column names) assuming the data type for Cod_Cliente is integer like.