Board index » delphi » How to filter the data by Partial match anywhere

How to filter the data by Partial match anywhere

Hello,

I use TTable and want to filter the data by Partial match anywhere in
the string data, looks like  '*ab*'. However, only 'ab*' works. Is there
any way to get around? Your help would be greatly appreciated.

Jay.

 

Re:How to filter the data by Partial match anywhere


Use the onFilter event of the TTable for this king of filtering.
Why not use a Tquery instead?

Re:How to filter the data by Partial match anywhere


I found the way. Thanks.

Jay.

Quote
Jay Cheng wrote:
> Hello,

> I use TTable and want to filter the data by Partial match anywhere in
> the string data, looks like  '*ab*'. However, only 'ab*' works. Is there
> any way to get around? Your help would be greatly appreciated.

> Jay.

Re:How to filter the data by Partial match anywhere


Use an OnFilterRecord event handler or a query with the SQL LIKE operator.

--
Bill

Other Threads