title: Oracle Query on Comma Separated Values In a Column
body: <p>I have two tables. One table is a list of access points. The other is a list of who has access to what. 
  It use to be a person had access to either one thing or all things. But, now that has changed. Now someone might have access to several points. 
  The wrench in the system is that in the column that shows what they have access to may have a single value, "ALL" for all access or a comma separated list (which is new). 
  I originally thought I could just do <code>WHERE Access_To Here IN()</code>, but I am unsure how to convert the value of Access_To to a formatted list. 
  I need to be able to do this as a single query since I am using it for a LOV in APEX. 
  So, I need some help.</p>
  
  <p>The Access_Points_Table has only one column, Access_Points. Here are some example values that it might have:</p>
  
  <pre><code>CSX
  CZR
  XR3
  NBO
  QHG
  </code></pre>
  
  <p>The Users_List table has several columns, but the most important are User_Name, Access_To. Here are some example values that it might have:</p>
  
  <pre><code>Joe | ALL
  Fred | CSX
  Allen | CZR, NBO
  Hank | QHG
  </code></pre>
  
  <p>Here is query I am currently using, but it only works if there is only a single value in the Access_To column.   </p>
  
  <pre><code>SELECT DISTINCT Access_Points VALUE
  FROM Access_Points_Table apt
  JOIN
  Users_List ul
  ON (ul.wwid = 'ZZ999'
  AND (ul.Access_To = 'ALL' OR apt.symbol_name = ul.Access_To))
  ORDER BY name ASC  
  </code></pre>
  
  <p>What I am trying to accomplish is:</p>
  
  <pre><code>SELECT DISTINCT Access_Points VALUE
  FROM Access_Points_Table apt
  JOIN
  Users_List ul
  ON (ul.wwid = 'ZZ999'
  AND (ul.Access_To = 'ALL' OR apt.symbol_name IN(Something Goes Here)))
  ORDER BY name ASC       
  </code></pre>
  
  <p>So, if run a query for the user Allen, it will return the rows:</p>
  
  <pre><code>CZR
  NBO
  </code></pre>