Select Query on a DataTable to obtain a new DataTable
Posted on 2008-10-08
I'd like to execute a select query on a DataTable, and obtain as a result a new DataTable only populating with the columns that I've defined in my query.
For example, I've got a DataTable with 3 columns: DataSetId (Long Integer), X (double), Y (double).
And I want to execute the query "SELECT X,Y FROM MyTable WHERE DataSetId=2", to obtain a new datatable with only two columns X and Y, and the selected rows.