7645 Null or empty full-text predicate
问题 I have a query that ran fine on SQL2005 but moving the database to SQL2008 gives me the error from the title. The code that is the problem is a call to CONTAINS, CONTAINSTABLE or FREETEXT with an empty parameter. However I'm trying to only call or join when there is a value like such where (@search_term = '' or (FREETEXT(lst.search_text, @search_term))) or left join containstable (listing_search_text, search_text, @search_term) ftb on l.listing_id = ftb.[key] and len(@search_term) > 0 However