Help! "#1" in Contains returns unexpected

Tech-Archive recommends: Fix windows errors by optimizing your registry



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....


.



Relevant Pages

  • Re: Help! "#1" in Contains returns unexpected
    ... might put the fulltext query results into a temp table, ... from that for the LIKE string. ... I found that the Like syntax makes the advanced search ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Help! "#1" in Contains returns unexpected
    ... but # is also punctuation and serves as a wordbreaker. ... On a simple search I use the syntax; ... However when I use my advanced search that allows ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Help! "#1" in Contains returns unexpected
    ... I will just have to do better research on the peculiarities of fulltext ... On a simple search I use the syntax; ... However when I use my advanced search that allows ... return anything with '1' in it and that is a very small string. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Customize/Modify Search.asmx for custom search?...
    ... The best place to try this is to use the Advanced Search web part, ... The above string searches for the string "test", ... "Robert Nase" wrote in message ... >>> But with the said parameters we can restrict to search ...
    (microsoft.public.sharepoint.portalserver.development)
  • Searching for a string in help
    ... for a string i.e. "Color Namespace". ... advanced search somewhere that I am missing? ...
    (microsoft.public.vsnet.general)