title: Converting String concatenated with ',' to be used in subquery at oracle SQL
body: <p>I want to use my result of function e.g. <code>'S500,S600,S700,S800'</code> in a subquery in another script like: </p>
  
  <pre><code>where dept_no in (my result of function)
  </code></pre>
  
  <p>So I want to convert my string result to be like this <code>('S500','S600','S700','S800')</code>. </p>
  
  <p>I tried to do this with dynamic SQL but I can't get it to work.  </p>