Delete rows in linq

Hi Team,

I need to delete row in linq if name columns contains any comma,

Aware that it can be achieved using filter datatable activity but wish to know how to do in linq query

image

Thanks,
Ula

@Boopathi Can you try this Query Using Assign :
Let’s say you have the Datatable as DT, Then ,

DT = DT.AsEnumerable().Where(Function(row) Not(row(“Name”).ToString.Trim.Contains(“,”))).CopyToDataTable

2 Likes

DataTableVar = DataTableVar.AsEnumerable.Where(Function(row) Not row(“Name”).ToString.Contains(“keyword”) ).CopyToDataTable

1 Like

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