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 -> Re: Creating valid and well-formed XML-output

Re: Creating valid and well-formed XML-output

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Mon, 28 Aug 2006 11:39:11 +0200
Message-ID: <44f2b9cc$0$10153$9b4e6d93@newsspool2.arcor-online.net>


willy schrieb:

>
> However, when I run this query I get the following error:
> ORA-01427: single-row subquery returns more than one row.
> Apparantly I should convert the result of the subquery into a single
> row.
> Any suggestions on how to do this?
>
> Willy Tadema
>

It seems, your relational design is not ok, if relationship between employees and departments is not n:1, but n:m, so you need an additional table to resolve this relationship. If you have done this step, then you   could join both tables and get result in tabular form (however you would get some rows for every employee employed in more than one department). To get results as you wish, you'll need some kind aggregation, from here transform into xml is basic thing. If you could post ddl for your tables, somebody can suggest appropriate query for you.

Best regards

Maxim Received on Mon Aug 28 2006 - 04:39:11 CDT

Original text of this message

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