Re: Strange Join needed...

From: Kim Ng <kimmng_at_pebbles.uswnvg.com>
Date: 28 Oct 1994 16:13:15 GMT
Message-ID: <38r7ur$h01_at_fred.uswnvg.com>


I don't believe straight "select" will do it. You probably will have to use something like PRO*C. Anyway, you'll also need to concatenate the ",".



 Kim Ng
 (Just a low life contract programmer. Thus, my clients won't adopt my views.)

msahoo_at_indyvax.iupui.edu wrote:
: Hello all,
 

: I have a question:
 

: I have a primary table A that is joined to several one-to-many tables B and C.
:
: A normal join will give me the following:
 

: SELECT A.field1, A.field2, B.field3, C.field4
: FROM A, B, C
: WHERE A.key_id = B.key_id and
: A.key_id = C.key_id
 

: A.field1 A.field2 B.field3 C.field4
: --------- --------- --------- ---------
: Smith John aaa ddd
: Smith John aaa eee
: Smith John bbb ddd
: Smith John bbb eee
: Smith John ccc ddd
: Smith John ccc eee

: How can I get a result more like this:
 

: A.field1 A.field2 B.field3 C.field4
: --------- --------- --------- ---------
: Smith John aaa, bbb, ccc ddd, eee
 

: This is preferred in that it will be less rows to send to my client app.

: Any help is appreciated.
 

: Thanks,
 

: Manash Sahoo.
  Received on Fri Oct 28 1994 - 17:13:15 CET

Original text of this message