title: get names from comma separated ids in SQL
body: <p>I have this kind of table in Oracle</p>
  
  <pre><code>empid name deptid
  1      a    1,2
  2      b
  3      c    1,2,3
  </code></pre>
  
  <p>and I have department table as below,</p>
  
  <pre><code>Deptid DeptName
   1      IT
   2      Finance
   3      HR
  </code></pre>
  
  <p>i want result like this in select statement,</p>
  
  <pre><code>empid name dept
  1     a    IT,Finance
  2     b
  3     c    IT,Finance,HR
  </code></pre>
  
  <p>i have 1000+ rows in both tables, i am beginner to pl\sql and don't know how to do this, please help.</p>