Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Substring test within DataTable.Select()

I have a DataTable with results already pulled down from a back end. I want to do a DataTable.Select(), but the criteria is based on a SUBSTRING of one of the columns.

Is there syntax to use in the Select() method that allows for substring of a column test, or do I have to do it the hard way -- scan each row.

like image 422
DRapp Avatar asked Dec 09 '09 19:12

DRapp


1 Answers

You can use the LIKE operator in the expression given to Select():

table.Select("ItemName LIKE '*product*'")
like image 108
Amnon Avatar answered Sep 27 '22 21:09

Amnon