Using FREETEXT
the sntax for using freetext is
FREETEXT ( { column | * } , 'freetext_string' )
I put together a test like:
SELECT description_of_problem
FROM servicerequests
WHERE FREETEXT(description_of_problem, @description)
and it worked fine
What I have a a text box in a search form that may or may not be used. I can use this syntax for that situation
ISNULL ( check_expression , replacement_value )
So I put this together (without freetext):
(part of a where clause)
and (sr.description_of_problem = isnull(@desc, sr.description_of_problem) or sr.description_of_problem is null)
I need to use FREETEXT so what I came up with in the integration looks like this, which seems logical to me:
and (FREETEXT(sr.description_of_problem, isnull(@description, sr.description_of_problem)) or sr.description_of_problem is null)
Problem is I can't get it to work right...
Incorrect syntax near isnull is what I get in query analyzer.
Can anyone help?
Thanks
|