basically I have a string being passed to a variable.. say
@MyParameter = "Flower Beer Dog"
so what i want to do is to find all the records that contain “Flower”, “Beer” or “Dog”
Somehing like if I said
select * from myTable where myColumn = 'Flower' or myColumn = 'Beer' or myColumn = 'Dog'
but the thing is that I am getting it in the @MyParameter and I am not sure how to split it and and convert it into the query above
This returns a table that displays your delimited string as seperate fields instead. I.e.: “Flower Beer Dog” becomes
Flower
Beer
Dog
The function uses commas to delimit instead of spaces, but you can change that part if you need to.
Then you use it like this: