Re: Different results from like and contains
- From: "John Kotuby" <JohnKotuby@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Dec 2007 09:38:27 -0500
Olaf,
Thanks for the heads-up on that information.
"Olaf Pietsch" <olaf_pietsch@xxxxxxxxx> wrote in message
news:%23iWYMNLSIHA.5164@xxxxxxxxxxxxxxxxxxxxxxx
Hi John,
"John Kotuby" <JohnKotuby@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im
Newsbeitrag news:%23m1txyKSIHA.4880@xxxxxxxxxxxxxxxxxxxxxxx
I have 2 different queries that I expected to return the same results.
Where Name like '%fish%'
and Where contains((Name),'("*fish*")')
The first returned 181 results and the 2nd returned 178 results.
On closer inspection I determined that the Contains was not returning
Names with words that had "fish" embedded as in:
bigfishtackle.com
flyfishing
kingfisher
I thought that the *fish* would return words where fish was a suffix,
prefix or both.
The search with "*..." (leading asterisk) is not possible with contains,
only the "...*" is possible.
BOL says only:
<prefix_term>
Specifies a match of words or phrases beginning with the specified text.
Enclose a prefix term in double quotation marks ("") and add an asterisk
(*) before the ending quotation mark, so that all text starting with the
simple term specified before the asterisk is matched.
http://msdn2.microsoft.com/en-us/library/ms187787.aspx
Many Ragards,
Olaf
--
Gruß Olaf
Ich unterstütze PASS Deutschland e.V. (http://www.sqlpass.de)
Blog (http://www.sqlpass.de/PASSUserBlogs/tabid/178/Default.aspx?BlogID=3)
Regionalgruppe Köln/Bonn/Düsseldorf
(http://www.sqlpass.de/Regionalgruppen/KoelnBonnDuesseldorf/tabid/81/Default.aspx)
.
- References:
- Different results from like and contains
- From: John Kotuby
- Re: Different results from like and contains
- From: Olaf Pietsch
- Different results from like and contains
- Prev by Date: Re: new records aren't being added to ft catalog (sql 2005 ee)
- Next by Date: Re: Fulltext indexing of xml files problem
- Previous by thread: Re: Different results from like and contains
- Next by thread: Re: new records aren't being added to ft catalog (sql 2005 ee)
- Index(es):