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: Question on SELECT statement

Re: Question on SELECT statement

From: Dante A. Notari-Locher <dnotari_at_cso.at>
Date: 1997/08/21
Message-ID: <33FBE2FE.A23C4F72@cso.at>#1/1

Hi !

    I had the same problem some time ago. Because of lock of time I     did it the "quick and dirty" way:

            I wrote a function my_function(Master_pk).

            This functions returned a formated varchar2 with the desired result -

                in the function I worked with a loop and concatenation
of each
                value returned by the cursor-loop.


            Best regards

            Dante A. Notari-Locher

Chinh Nguyen wrote:

> Hi,
> I have a master/detail relationship tables as below:
>
> create table Master(PrimKey number, Otherkey varchar2(20));
> insert into Master values (1,'HELLO');
> insert into Master values (2,'BYE');
>
> create table Detail(ForeignKey number, column1 number);
> insert into Detail values (1, 200);
> insert into Detail values (1, 300);
> insert into Detail values (1, 400);
>
> commit;
>
> Question:
>
> Can I construct a select statement that will return "one and only
> one"
> row containing all detail for this tables relationship.
>
> The idea result row shoud look like:
>
> 1 HELLO 200 300 400
>
> Thanks in advance for your help.
Received on Thu Aug 21 1997 - 00:00:00 CDT

Original text of this message

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