all groups > sql server full text search > november 2003 >
You're in the

sql server full text search

group:

Server: Msg 7603



Server: Msg 7603 Pablo garcia
11/23/2003 1:53:51 PM
sql server full text search: I have a SP that has the following 'where'
statement '@sFamilyName is null or contains
(HCU.FamilyName, @sFamilyName)'

Everything works fine, until I do massive row inserts on
the table, and when using that SP I get the following
error:

Server: Msg 7603, Level 15, State 1, Procedure SearchHCUs,
Line 27
Syntax error in search condition, or empty or null search
condition ''.

If I delete most of the rows inserted, everything goes
back to normal.

The table has 'change tracking' and 'update index in
background'

This is the info about the SQl version:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195:
Service Pack 4)

any hint, clue, possible cause or solution will be
Re: Server: Msg 7603 John Kane
11/23/2003 3:23:38 PM
Pablo,
Is the @sFamilyName variable truly NULL? If so, in your stored proc
SearchHCUs, you may need to test for NULLs in @sFamilyName using ISNULL and
trap for a NULL condition when you issue the actual T-SQL statement as a
valid non-NULL search_word must be supplied.

It *might* also be possible that when you are doing a "massive row inserts"
and a user is querying against this FT-enabled table with 'change tracking'
and 'update index in background' enabled, that they are searching for a
search_word that has not yet been FT-Indexed and pushed to the FT Catalog?

Regards,
John



[quoted text, click to view]

Re: Server: Msg 7603 Pablo Garcia
11/23/2003 3:37:43 PM
YES, it is null but, shouldn't it pick the '@sFamilyName
is null' part of the clause?
The thing is that searching with @sFamilyName works for
some time, and then ... after inserting lots of rows it
starts failing.

My suspicion is that it has something to do with the
number of rows for that table. It starts failing in
diferent DBs (aka testing, dev, etc) when we reach certain
amount of rows.

thnx for your reply.
[quoted text, click to view]
Re: Server: Msg 7603 John Kane
11/23/2003 6:24:43 PM
Pablo,
If it NULL, you should add some code to prevent the execution of the SQL FTS
query. The error Msg text -"Syntax error in search condition, or empty or
null search condition " - is generic and covers errors in the search
condition that can also include syntax errors as well as empty or null
search conditions. Whether or not, your query works some of the time or
not, you still should trap for a NULL search condition and not execute the
query if that occurs.

If you add the check for NULL, does the query continue to fail when the
number of rows reaches a certain number?

Regards,
John

[quoted text, click to view]

Re: Server: Msg 7603 Pablo Garci
11/24/2003 11:59:59 AM
thnx for the help. I ended up modifying the SP, thing that
I wanted to avoid. Now everything seems to be working.
[quoted text, click to view]
AddThis Social Bookmark Button