Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Transpose Oracle Table (Rows to columns)

Re: Transpose Oracle Table (Rows to columns)

From: Michael Komlev <mike_komlev_at_avionics.bfg.com>
Date: Thu, 03 Dec 1998 09:47:18 -0500
Message-ID: <3666A476.21351BBD@avionics.bfg.com>


Hi there,
Could you try something like that?
Mike

select Proj, Prot, Pid, SUM (HGB) HGB, SUM (RBC) RBC, ... from
(
select Proj,

       Prot,
       Pid,
       DECODE (labcode, 'HGB', Result, 0) HGB,
       DECODE (labcode, 'RBC', Result, 0) RBC,
       DECODE (labcode, 'HCT', Result, 0) HCT,
       ...

from ...
)
group by Proj, Prot, Pid; Received on Thu Dec 03 1998 - 08:47:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US