How to delete matched rows in datatable

Hi All,

I have datatable of below rows.
TN
6518027168
6518027169
6518027171
6518027172
6518027173
6518027174
6518027175
6518027176
6518027177
6518027178
I need to execute sql query and i will get output like below
Pilot_tn
6518027168
6518027169
i want to eliminate the rows which i got from sql out from main data table
Out put should be like below
6518027171
6518027172
6518027173
6518027174
6518027175
6518027176
6518027177
6518027178
Can someone help me on this

If we call the first datatable DT1 and the second datatable DT2, you can filter it like this:

DT1 = DT1.AsEnumerable.Where(Function(r) Not DT2.AsEnumerable.Select(Function(x) x("Pilot_tn")).ToList().Contains(r("TN"))).CopyToDataTable
1 Like

Check this below workflow, @thima
Uipath_DeleteMatchedRows.xaml (9.4 KB)
Hope this may help you :slight_smile:

Thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.