Hi ,
You can Join Dt1 and DT2 using Left join and keep the data table in Left as the one which you want in output and conditions can be for Item number in Both DT.
Hi Rahul, Thanks for the Reply .What could be the code for the fitlering ? I have assigned the each row of DT1 to a variable and i need to put that variable data as the filter criteria for DT2.
@SIMIL , when you use “For Each Row in datatable”, you can access the values in each row by their column names or column indexes.
Eg: CurrentRow(“Your Column name”)
Then this would be the code to filter DT2.
ResultDT = DT2.AsEnumerable.Where(function(row)row(“Column Name to filter”) = CurrentRow(“Your Column name”)).CopyToDataTable
After each iteration, ResultDT will be different based on the value in column of DT1. You may output ResultDTs or write them on excel sheets.