Re: search error
- From: "tshad" <tscheiderich@xxxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 11:41:56 -0700
"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
>>
>>
>
>
.
- Follow-Ups:
- Re: search error
- From: tshad
- Re: search error
- From: Hilary Cotter
- Re: search error
- From: Hilary Cotter
- Re: search error
- References:
- search error
- From: tshad
- Re: search error
- From: John Kane
- search error
- Prev by Date: Re: search error
- Next by Date: Re: search error
- Previous by thread: Re: search error
- Next by thread: Re: search error
- Index(es):
Relevant Pages
|