I am passing in a @Description parameter to a stored procedure (VARCHAR). The parameter could be something like the book. I want to return records where the column contains both the and book.
These records would return:
the green bookthe huge orange book
I have a split function to split the @Description parameter by the space, but I have no idea how to include this in the where clause … I also need to ignore the @Description parameter when it is NULL.
Disclaimer: I apologize if this was previously asked … I searched
for a while and didn’t find anything.
Well, if you want to have a result that have all the words on your parameter, you can do something like this: