Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL - concatonating fields in different records

Re: SQL - concatonating fields in different records

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 24 Apr 2001 22:46:48 -0700
Message-ID: <3AE664C8.5B106064@exesolutions.com>

If not hierarchical, link to the same table multiple times using different aliases such as:

SELECT fieldnames
FROM dba_tables TAB_A, dba_tables TAB_B
WHERE TAB_A.fieldname = TAB_B.fieldname

If what you are talking about is a hierarchical situation you want to use CONNECT BY. Daniel A. Morgan

James Alexander Starritt wrote:

> I know this question has been asked and answered on this forum, but I can't
> find the thread. I thought I would never need to do anything like this or I
> might have paid a little more attention.
>
> I have a table with multiple names the are marked as sponsors in the rile
> column.
>
> Name | Column
> ----------------
>
> Bob Sponsor
> John Sponsor
> Kate Client
> Boris Sponsor
>
> What I would like to do is produce out put from this table in this form
> Bob, John, Boris. Forget decode for formatting I have that down, I was more
> wonding how to reference data from the same field but part of a different
> record.
>
> As always, any help of advice would be appreciated, and if you find that
> thread let me know what its called.
>
> --
>
> James Starritt
  Received on Wed Apr 25 2001 - 00:46:48 CDT

Original text of this message

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