DataTable select with delimiter

bczm8703

Member
Joined
Jan 21, 2014
Messages
7
Programming Experience
1-3
Hi,

is it possible to do a row filter or linq where splitting the filter string by commas

NameDepartment
User 1HR
User 2PR
User 3IT
User 4Sales

i would like to pass in a search string, eg: HR,PR,

user 1 and user 2 should come out
 
Solution
I can't recall whether the client side DataTable supports IN SQL operator, and I'm too lazy to check right now. I do know they SQL Server supports it.
What is the backing database behind that table? Or are you trying to do the filtering on the client side?
 
That's what OR operators are for. You want rows where a column contains one value OR another value. If you read the documentation for the appropriate member, that will point you to the DataColumn.Expression property documentation to learn the appropriate syntax.
 
I can't recall whether the client side DataTable supports IN SQL operator, and I'm too lazy to check right now. I do know they SQL Server supports it.
 
Solution
Back
Top Bottom