Doug Andersen (9/23/2008)
Nope, because full-text searches complain when you attempt to search with a null.
Yes, the stupid NULL predicate
But maybe a clever getaround?
Hopefully the short circuit will pick up the first condition (@name = 'nothing') without calling CONTAINS
You never know with SQL full-text functions
SQLServerNewbieMCITP: Database Administrator SQL Server 2005
IF @name IS NULL
SET @name = 'nothing'
where country in (@countryparameter)
and customertype in (@customertypeparameter)
and (@name = 'nothing' OR contains(name,@name))