[askdba] Query format - Urgent

  • From: "Pradhan" <pradhan@xxxxxxxxxxxxxxxx>
  • To: "LazyDBA.com Discussion" <oracledba@xxxxxxxxxxx>
  • Date: Mon, 11 Oct 2004 11:12:29 +0530

Hi Folks,
I have a query which gives me data in vertical format eg:

select empnum, saldesc, amount1, amount2 from salinfo

empnum    saldesc    amount1    amount2
--------    -------    -------    ---------
001          basic        100.00        0.00
001          splall         132.00      50.00
001          da            200.00       10.00
001          inctax       50.00          0.00


I want the same to be formatted as

empnum   basicamt1   basicamt2   splallamt1    splallamt2    daamt1    daamt2   
 inctaxamt1    inctaxamt2
--------  ----------    --------    ---------    ----------    -------    
------    -----------    ----------
001         100.00       0.00            132.00        50.00        200.00      
10.00      50.00            0.00


can any one help me in getting the data in the above said format.

Warm Regards,

Pradhan


Other related posts: