Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL CURSOR
A quick a dirty way of producing a non-normal report (if you have only a
few parts) would be using the outer join a few times.
Let me emphasize: You would only want to do this is if there was a small natural limit of parts. Otherwise it's file processing with dbms_output statements from PL/SQL.
select t0.id, t0.head-line, t1.text, t2,text, t3.text, t4.text from doc t0
doc_text t1, doc_text t2, doc_text t3, doc_text t4
and (t0.id = t2.fk_doc (+) and 2 = t2.order (+)) and (t0.id = t3.fk_doc (+) and 3 = t3.order (+)) and (t0.id = t4.fk_doc (+) and 4 = t4.order (+));
PGY
![]() |
![]() |