Hi I am trying to run this query in SQL but it is not giving me the result :
SELECT COUNT(*) AS Expr1
FROM restaurantData
WHERE (restaurantInfo LIKE '''%' + 'xyz' + '%''') OR
(restaurantName LIKE '''%' + 'xyz' + '%''') OR
(restaurantDescription LIKE '''%' + 'xyz' + '%''')
I have restaurantName column with value xyz Restaurant
Here is some sample data
Why the extra single-quotes?
It looks like you’re trying to build it dynamically; if that’s the case, then I’d suggest you post how you’re building it.