I have a situation like, i want to update the target table with the values present in the Hashed file. I am having all the keycolumns of the target table present in the hashed file also. The job design is
Code: Select all
Hashfile ---> Transformer --> Target(DRS).
But the issue is, I want to update a non key column to value 'X' , by checking the same non key column, something like
Code: Select all
UPDATE TABLE SET NK1 = 'X' WHERE K1= 'INPUT VAL' AND K2 = 'INPUT VAL' AND K3 = 'INPUT VAL' AND K4 = 'INPUT VAL' AND NK1 = 'Y' (NK - Non Key, K - Key)
I want to update the column NK1 to value 'X', if it is only with a vlaue 'Y',. The issue is , we cannot enter the same column name (NK1, IN THIS CASE) in the Column tab. As of now as a workaround I have defined NK1 only once and marked it as Non key, i have converted the Target Update action as "User-Defined SQL", and wrote the SQL shown above. It is working fine, but i prefer to use "Update Existing Rows only" target action , as we will use this job with multiple Databases.
Please advice, how to handle this?