This uses CROSS APPLY and the fn_split() function to separate out parameters. The @vParam parameter stores your LIKE conditions, separated by commas.
Delimited String Parsing Functions - TwoCol set
Feed it two delimited strings of horizontal data and it returns it back as a vertical table with the two column data in the same synchronized position order.
2008-11-03 (first published: 2008-08-05)
2,192 reads