Hi,
I have two data tables, one table[Dt1] with 5 columns with Invoice No( Index2 )and in another data table
[Dt2] I have 2 columns with Inovice No(index 0) and a Credit value(1).
If the Invoice No match then the credit value has to be written in dt1 without any interference with Dt1 data in Coloum6 and the row counts in both in both invoices differ.
via Linq only
Kindly,let me know if there’s a solution
As I am a novice in this its hard to comprehend.
Maybe we could first give a Try with the Join Datatables Activity. You could combine both the Datatables with a Key Value (Invoice), then filter only the Required Columns needed for the output.
Hey @sudharsan
(From d1 in dt1.AsEnumerable
Join d2 in dt2.AsEnumerable
On d1(“Credit value”).toString.Trim Equals d2(“Credit value”).toString.Trim
Let ra = d1.ItemArray.Concat(new Object(){d2(“col1”), d2(“col2”)}).toArray
Select r = dtTarget.Rows.Add(ra)).copyToDataTable
I have two data tables, one table[Datatable_FilteredVlookup] with 5 columns with Invoice No( Index2 )and in another data table
[outdt] I have 2 columns with Inovice No(index 0) and a Credit value(1).
If the Invoice No match then the credit value has to be written in dt1 without any interference with Datatable_FilteredVlookup data in Coloum6
sry,made a error in the question
and
added a little more reference…