https://www.csharp-examples.net/dataview-rowfilter/


String and number values

String values are enclosed within single quotes (if the string contains a single quote, the quote must be doubled).

Number values are not enclosed. 


Comparison operators

Following comparison operators are available

=

equal

<>

not equal

<

less than

<=

less than or equal

>

larger than

>=

larger than or equal


IN and LIKE operator

The IN operator is used to include the values from a list (applicable to both string and number values)


       "Step IN (1,3,5)"


The LIKE operator is used to included values that match a pattern with wildcards. Wildcard characters are * or % and can only be used at the beginning and/or end of a wildcard. In the next two examples, the first selects all names starting with a j, the second selects all names not starting with a j.


"Name LIKE 'j*'"

"Name NOT LIKE 'j*'" 


Boolean operator

Following boolean operators are available, ordered with decreasing precedence.


NOT


AND


OR



Arithmetic and string operators

Following arithmetic operators are available

+

addition

-

subtraction

*

multiplication

/

division

%

modulus


String concatenation is with +.


Aggregate functions