I set the dt variable which has defaulted value new datatable.
Then I assigned it with below query:
dt_mydatatable.Select("[ColumnA] = ‘filter’").CopyToDataTable().AsDataView().ToTable(“Selected”, false, “ColumnB”).AsEnumerable().Distinct(DataRowComparer.Default).CopyToDataTable()
Basically it gives me rows with word ‘filter’ found in ColumnA and from there I create a new datatable. After that I copy the new datatable that only contains unique value from ColumnB.
Everything is working fine. Is there any better way to get the same result?
Im not good at scripting. I google the expression and combined them to get the result.
Thank you in advance for reading and replying