Is there a way for CONTAINS to have, Column names as both parameters like
CONTAINS(cars.brand,COALESCE(@brand,cars.brand))
Now if @brand = NULL the second parameter will be cars.brand
making the query as
CONTAINS(cars.brand,cars.brand)
which will help me in ignoring the case where I will be looking for a particular brand in a table as in
WHERE 1=1
and will return the result no matter what the brand is .
But this fails with a syntax error as the second parameter has to be string .