Re: search error



"John Kane" <jt-kane@xxxxxxxxxxx> wrote in message
news:uZjx6d9QFHA.244@xxxxxxxxxxxxxxxxxxxxxxx
> Tom,
> You have multiple word or phrase search condition and you need to wrap
> both
> words within double quotes, for example:
>
> ... contains(jobdescription,'"Benefits clear"')
>
> This will return the phrase "Benefits clear" in the FT-enable column
> jobdescription, if this phrase exists in this column. You might find the
> following KB article helpful too: 246800 (Q246800) "INF: Correctly Parsing
> Quotation Marks in FTS Queries" at
> http://support.microsoft.com//default.aspx?scid=kb;EN-US;246800

That makes sense.

But what I want to be able to do is allow the user to put in -Benefits Clear
Payroll- in the text field and look for articles with Benefits and Clear and
Payroll in them, as well as deal with someone putting in Benefits and Clear
and Payroll.

I assume I would have to replace the blanks with "and" to make it work.

I played with the article you suggested and it shows how to surround "and
not" with double quotes as well as "or not". I am confused as to why you
would surround "and" and "or" with quotes - 'benefits and Clear' work.

Is there a regular expression that says to replace the blank with "and" only
if the 2 words are not (and,or,near) ?

Thanks,

Tom
>
> Regards,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
>
>
> "tshad" <tfs@xxxxxxxxxxxxxx> wrote in message
> news:#R9kgF8QFHA.2132@xxxxxxxxxxxxxxxxxxxxxxx
>> Why do I get the error:
>>
>> System.Data.SqlClient.SqlException: Syntax error occurred near 'clerk'.
>> Expected ''''' in search condition 'Benefits clerk'.
>>
>> I get this from:
>>
>> ... contains(jobdescription,'Benefits clear')
>>
>> Thanks,
>>
>> Tom
>>
>>
>
>


.



Relevant Pages

  • Re: search error
    ... >> Tom, ... >> You have multiple word or phrase search condition and you need to wrap ... if this phrase exists in this column. ... Is there a way of telling the regex to ignore changes inside quotes? ...
    (microsoft.public.sqlserver.fulltext)
  • Re: the greatest Beatle
    ... >The pot is calling the kettle black. ... Tom, I'm not the one who's posting wholly out-of-context quotes as well ... >Tony Bramwell, who knows Paul, says Paul believes it (which would ...
    (rec.music.beatles)
  • Re: Blowfish Sign Extension implementation risk
    ... Tom St Denis wrote in ... >> even claim to have invented the idea (designing an algorithm robust ... I put that in quotes to capture the ...
    (sci.crypt)
  • Re: Search for Record
    ... Tom, the difficulty I have with doubling the single quotes arises when you have functions that call other functions to build the strings. ...
    (microsoft.public.access.modulesdaovba)
  • Re: A lurkers impression of rmcr
    ... Tom, that statement seems familiar. ... Should you have placed it in quotes? ... But it such a wonderful line, I can never resist trotting it ... words belong, of course, to the divine Muriel Spark and are taken from ...
    (rec.music.classical.recordings)