title: Compare comma separated list with individual row in table
body: <p>I have to compare comma separated values with a column in the table and find out which values are not in database. [kind of master data validation]. Please have a look at the sample data below:</p>
  
  <p>table data in database:</p>
  
  <pre><code>id   name
  1    abc
  2    def
  3    ghi
  </code></pre>
  
  <p>SQL part :</p>
  
  <p>Here i am getting comma separated list like <code>('abc','def','ghi','xyz')</code>.
  now <code>xyz</code> is invalid value, so i want to take that value and return it as output saying "invalid value".</p>
  
  <p>It is possible if i split those value, take it in temp table, loop through each value and compare one by one.</p>
  
  <p>but is there any other optimal way to do this ??</p>