Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL Question - Transpose rows to columns
Are you able to transpose rows to columns easily with a single sql
statement?
example
select id, (select value from lab where code = 'HG' AND patient_id = l.patient_id(+)) HG,
(select value from lab where code = 'CR' and patient_id =
l.patient_id(+) CR
from lab l
Received on Thu Dec 03 1998 - 11:44:21 CST