I'm building a case in my query where if a field is either blank or has the substring 'Name Not Found' then the field in question should be replaced with the value of another field.
This is what I have so far:
CASE WHEN [Salesperson1 Name] = '' THEN [Salesperson Name (Primary)]
WHEN CONTAINS([Salesperson1 Name], 'Name Not Found') THEN [Salesperson Name (Primary)]
ELSE [Salesperson1 Name]
END,
but when I run the query I get this message:
Msg 7601, Level 16, State 2, Line 19
Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'staging_leads_rr' because it is not full-text indexed.
How could I get this done? What am I doing wrong? I'm not sure what the error message means, because I'm new to writing stuff in T-SQL.