title: T-SQL (Azure), how to see if multiple value are in a set
body: <p>I have a column <code>MyColumn</code> with a value such as "Value1,Value2" (a concatenated string generated using <code>for xml</code>). I also have a table valued parameter <code>@MyTVP</code> that might have rows with a value such as "Value2" (or several values). The SQL should function something like:</p>
  
  <pre><code>where MyColumn in (select col from @MyTVP)
  </code></pre>
  
  <p>I was thinking about writing a user defined function whose call would look something like:</p>
  
  <pre><code>where MyFunction(MyColumn, @MyTVP)
  </code></pre>
  
  <p>and the function would split MyColumn into separate values (like C#'s <code>arr.Split(',')</code>) and see if those values are in <code>@MyTVP</code>.</p>
  
  <p>First, is this a reasonable solution or should I head down a different path?</p>
  
  <p>Second, is there an efficient way to see if the multiple values in <code>MyColumn</code> are IN <code>@MyTVP</code>?</p>