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

Home -> Community -> Usenet -> c.d.o.misc -> Transpose rows to columns

Transpose rows to columns

From: <abhijitde_at_my-dejanews.com>
Date: Wed, 02 Dec 1998 18:44:00 GMT
Message-ID: <7441pf$3ki$1@nnrp1.dejanews.com>


Hi everybody,

Can anybody look into my problem? The problem is to transpose columns to rows dynamically.

The original table is -

Proj Prot Pid Labcode Result

001    1    1     HGB      100.00
001    1    1     RBC      200.00
001    1    1     HCT      300.00
001    1    2     HGB      150.00
001    1    2     HCT      112.00
001    1    2     RBC      150.00
001    1    2     XYZ      102.00

So, there could be say 50 labcodes vertically for each pid.

Now, the above has to be transposed to -

Proj   Prot  Pid   HGB     RBC     HCT      XYZ
001     1     1    100.00  200.00  300.00   Null
001     1     2    150.00  150.00  112.00   102.00

Any help/hints is appreciated.

Thanks!

Abhijit

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Dec 02 1998 - 12:44:00 CST

Original text of this message

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