I want to compare 2 DT using linq, DT2 compare to DT1, when the column WSID is match, value from Nominal on DT2 will write to spesific column in DT1 (can change) and when Nominal is null or empty, the value is set to " "
Where DT1 is
thanks for reply, but I have to set “Nominal” value in spesific column, how can I do it? now I using linq for get just a nominal value with WSID in DT1 order, and write range it to column I want
dt2.AsEnumerable.ToDictionary(Function (x) x("WSID").toString.Trim, Function (x) x("Nominal").toString.Trim)
so the check can be done within a for each row loop
for the check we can use the dictionary containsKey method
for the empty Nominal check we can use: isNothing(), String.IsNullOrEmpty methods
updating DT1 can be done within an assign activity
in your other topic we shared with you some Blog introducing the different options for updating a column value. As also discussed we would recommend to start with the for each row, when it is about the column value updates.