I would like to have a SELECT query (or statements) in SQL Server 2005 that selects records where one of the items in a Complex field (items separated by commas) matches another field in a view. When the Complex field contains only one item, it is trivial:
where Complex IN
Let's say that SMS could be potentially be some of these 4 values: A, B, ABC, BD
And let's say that Complex could contain any of those 4 values or a combination of them, separated by commas:
Thus, I want a record having Complex field of "A,BD" to be displayed if one of the SMS values is "A" or "BD"; however, the record would not display if SMS is only the value of "B".