Saturday, February 25, 2012
containstable(isabout...) query length
i am using a very long query in a containstable predicate with an isabout
search method.
somthing like this :CONTAINSTABLE( dbo.TBL_FTS_DATA,FreeTextDump,
'ISABOUT(....
my problem is that when my' ISABOUT is more then 8000 chars long the query
fails.
it seems that the isabout portion of the command is limited to 8000 chars.
is there any way around this?
thanks
shay
No, this is hard coded. Have you seen this kb?
http://support.microsoft.com/default...b;en-us;317486
A problem like this was solved with SP3. I take it you are above Sp3. One of
the work arounds is that you could do two separate ContainsTable queries and
AND or OR them.
Another problem is with near which is hard coded as 1366 words IIRC.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"shay cohen" <shay@.infospheraltd.com> wrote in message
news:egjgSYEXFHA.3760@.TK2MSFTNGP15.phx.gbl...
> Hi ,
> i am using a very long query in a containstable predicate with an isabout
> search method.
>
> somthing like this :CONTAINSTABLE( dbo.TBL_FTS_DATA,FreeTextDump,
> 'ISABOUT(....
> my problem is that when my' ISABOUT is more then 8000 chars long the query
> fails.
> it seems that the isabout portion of the command is limited to 8000 chars.
> is there any way around this?
> thanks
> shay
>
Friday, February 24, 2012
Contains Predicate and Double Quotes
double quotes that are actually in a string that I am using in the
contains predicate.
Here is an example
select *
from table
where contains(field, '"he said "what is wrong", that is what he
said"')
I need the double quotes in the string because they are part of the
text. Of course, Fulltext search raises the error
Server: Msg 7631, Level 15, State 1, Line 1
Syntax error occurred near 'what is wrong", that is what he said'.
Expected '' in search condition '"he said "what is wrong", that is
what he said"'.
If I remove the double quotes, the search does not return the proper
results.
Thanks in advance for the help
Bill"swtwllm" <swtwllm@.alum.iup.edu> wrote in message
news:c38d6cfb.0402201036.6cdf8d87@.posting.google.c om...
> I have been searching for an escape character or a way of escaping
> double quotes that are actually in a string that I am using in the
> contains predicate.
> Here is an example
> select *
> from table
> where contains(field, '"he said "what is wrong", that is what he
> said"')
> I need the double quotes in the string because they are part of the
> text. Of course, Fulltext search raises the error
> Server: Msg 7631, Level 15, State 1, Line 1
> Syntax error occurred near 'what is wrong", that is what he said'.
> Expected '' in search condition '"he said "what is wrong", that is
> what he said"'.
> If I remove the double quotes, the search does not return the proper
> results.
> Thanks in advance for the help
> Bill
It looks like this has been answered in
microsoft.public.sqlserver.fulltext - please don't post to multiple
newsgroups separately.
Simon|||swtwllm (swtwllm@.alum.iup.edu) writes:
> I have been searching for an escape character or a way of escaping
> double quotes that are actually in a string that I am using in the
> contains predicate.
> Here is an example
> select *
> from table
> where contains(field, '"he said "what is wrong", that is what he
> said"')
> I need the double quotes in the string because they are part of the
> text. Of course, Fulltext search raises the error
> Server: Msg 7631, Level 15, State 1, Line 1
> Syntax error occurred near 'what is wrong", that is what he said'.
> Expected '' in search condition '"he said "what is wrong", that is
> what he said"'.
> If I remove the double quotes, the search does not return the proper
> results.
I would expect doubling the quotes would help, but I don't use full-text
myself, so I don't know.
microsoft.public.sqlserver.fulltext may a better place to ask.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp