none
How to filter rows & select distinct from filtered rows? RRS feed

  • Question

  • How to filter rows & select distinct from datatable.

    I have a DataTable with the following columns. “ID”, ”Type”,  ”AccountNumber”, ”Name”, “Value”, “Year”.

    I want to filter rows where ID = 1 and Type = 2 and then from the filtered rows I want to take distinct “AccountNumber” & “Name”

    For example

    filterExpression = "ID = 1 and Type = 2";

    var rows = Table.Select(filterExpression);

    // from rows I want to select distinct “AccountNumber” & “Name”

    I would like to do this in one LINQ query if possible

    Thursday, September 5, 2013 10:05 PM

Answers

All replies