Help! "#1" in Contains returns unexpected
- From: "John Kotuby" <JohnKotuby@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Dec 2007 10:29:03 -0500
Hi all,
Need some help with this. On a simple search I use the syntax;
----------------
where title like'%#1%'
---------------
returns what I expect. However when I use my advanced search that allows
many criteria, I go to using indexed fulltext search and CONTAINS. I found
that the Like syntax makes the advanced search run way too long, so I am
trying to avoid it. The syntax ends up being:
---------------
contains((title ),'("#1*")')
---------------
Note I include the * to supposedly behave somewhat similar to the "like"
syantax.
Well now everything with the '1' in it is returned. I know that CONTAINS
ignores some punctuation like single-quotes but why the '#' sign? It does
return anything with '1' in it and that is a very small string.
(Yes I also found out that I can't pass the #1 as a querystring parameter in
ASP.NET but that is for another group.)
Is there anyway I can get CONTAINS to recognize the combination of "#1*"
???
Thanks to all....
.
- Follow-Ups:
- Re: Help! "#1" in Contains returns unexpected
- From: Russell Fields
- Re: Help! "#1" in Contains returns unexpected
- Prev by Date: Re: Different columns
- Next by Date: Re: Help! "#1" in Contains returns unexpected
- Previous by thread: Grab text near match in fulltext
- Next by thread: Re: Help! "#1" in Contains returns unexpected
- Index(es):
Relevant Pages
|