The list of comparison and logical operators that can appear in a TDataset Filter is in the Delphi 2009 help (I don't know about other versions of Delphi). Search for 'Setting the Filter Property' in the help.
The listed operators are:
<
>
>=
<=
=
<>
AND
NOT
OR
+
-
* (multiply)
/
* (wildcard for partial comparisons)
the statement in filter would be inserted after a WHERE keyword in a SQL statement so you might use everything that could be in a WHERE statement in SQL
for example you could use this snippet to have very flexible filter in your applications :
dm1.qryCustomer.Filter:='CU_Partner=true and CU_CompanyName like ''%'+edtSearchCriteria.Text+'%'''
then after applying filter all company names that are LIKE '%X%' would be retrieved
Please consider that this filtering is applied at client side so it would be some times good and sometimes a diaster.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.