How to compare 2 datatable and remove data in 2nd table which are not matching?

Hi @Vanitha_VS

You can try like this

dtOutput=dt2.AsEnumerable().Where(Function(x) dt1.AsEnumerable().Any(Function(x) x(“ID”).ToString=row(“ID”).ToString)).CopyToDatatable

Here id is the column in dt1 and dt2 which is being compared and dt1 is first datatable and dt2 is second datatable

Dtoutput being the output required

Cheers

Chhers