How to remove multiple columns in datatable using linq?


I have data in data table.Now I need only few columns to be required from the datatable. How to remove multiple columns using linq?


You can use below Activity to delete columns.

If you need only few columns from a datatable then instead of deleting multiple columns we can get those few like this in a simple assign activity
Yourdatatablename = Yourdatatablename.DefaultView.ToTable(False,”columnname1”, “columnname2”, “columnname3”).copytodatatable()

Cheers @SARITHA_Masani

1 Like