Where clause in DataTable.Select method

  • Thread starter Thread starter Matthew Towpik via DotNetMonster.com
  • Start date Start date
M

Matthew Towpik via DotNetMonster.com

Just curious how I would include a WHERE clause in the filter string of the
Select method.

If I want to SELECT * FROM Column1 WHERE Column2 = SomeValue

thanks
 
What does 'From Column1' mean? You can't select from columns, only from
tables. And the table is always going to be the DataTable you are calling
the Select method on.

So the WHERE clause you have in the statement is already what you need.
 
you can only select from a DataTable, and the expression passed to Select
would be the WHERE clause

myTable.Select("Column1 > 0 AND Column2 = 'Somevalue' ");
 
Back
Top