I have 2 datatables - dt1 and dt2. there is one column common between dt1 and dt2. I need to use this common column and extract values from dt2 into dt1. No rows should be brought over from dt2 to dt1 if there is no match. All dt1 rows must be present
I am using a left join and it is not going as i want it to.
Anyone has any ideas as to what I am doing wrong?
in general the join datatable activity can do this types of joins. But the result requires a postprocessing (e.g. filtering, moving values to another datatable). Just share some sample data inputs, outputs and we will have a look on it. Maybe a LINQ can help as well.
Please see the attached for sample data.
“VendorCode” in dt1 must look for “Vendor code” in dt2 and bring back the columns from dt2 if there is a match. (kind of a vlookup from dt1) dt1 sample data.xlsx (8.4 KB) dt2 sample data.xlsx (8.3 KB)
Inspecting the datatable dtResult it looks similar to your definition. It might be the case that excel can/will do a reformatting of the column format (depends on many factors, also locals). In such a case just readjust the column format with the help of Balarevas component / activity: