title: How to convert rows into columns in Oracle?
body: <p>I have table with data like shown below in Oracle database.</p>
  
  <pre><code>emp_num  person_name  organization  earned_date  sum(hours)
  -------  -----------  ------------  -----------  ----------
  36372    Name1        Test1         23-MAR-11      3.17
  36372    Name1        Test1         15-MAR-11      6.70
  40208    Name2        Test2         08-APR-11     13.50
  40208    Name2        Test2         06-APR-11     12.07
  </code></pre>
  
  <p>I need to change query output like below. How can I do that?</p>
  
  <pre><code>emp_num  person_name  organization  23-MAR-11  15-MAR-11  08-APR-11  06-APR-11
  -------  -----------  ------------  ---------  ---------  ---------  ---------
  36372     Name1       Test1           3.17        6.70      
  40208     Name2       Test2                                 13.50      12.70     
  </code></pre>