Datatable select query

I am trying to get a specific value from the data table using filter on column with specific value

Input: Filter Column, Filter Value, Column to be read
Output: String value

what is the issue in the query?

dtTable.AsEnumerable.Select(Function(s) s(inStrColumn)).Where(Function(s) s(in_StrFilterColumn).equals(in_StrFilterValue))

Hi,

you can try this way
filterDt=dt1.Select(“[ColumnName]=‘1’”).CopyToDataTable

dt.select(“[column name] ='”++“'”).FirstOrDefault(“”).tostring

1 Like