Board index » delphi » Q:SQL:String Field fuzzy search

Q:SQL:String Field fuzzy search

Quote

> Already tried "LIKE", but it only matches the start of the field.
> Even tried it like this: DESC LIKE "*WORD*", which does not work at all.

use DESC LIKE "%WORD%"

Paul

 

Re:Q:SQL:String Field fuzzy search


Quote
emi...@tnet.co.za wrote:

> Hi everyone.

> Can anybody tell me how to do fuzzy matching in SQL on a string/text field.

> I'm using Delphi 1.

> Already tried "LIKE", but it only matches the start of the field.
> Even tried it like this: DESC LIKE "*WORD*", which does not work at all.

> Required Matching:   DESC contains "PHRASE"
>         EG:    "WORD" ,  "WORD 1" , "The WORD" , " THE WORDS HERE"
>                 must all match.

> I'm totally stumped. Please help.

correct me if i'm wrong, but shouldn't you try: LIKE '%WORD%'

hope this helps
regards, Bernard

Other Threads