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: 'SUM' strings to concatenated string

Re: 'SUM' strings to concatenated string

From: Robert Klemme <bob.news_at_gmx.net>
Date: Fri, 17 Feb 2006 13:35:41 +0100
Message-ID: <45lu92F7b5n8U1@individual.net>


Alexander Mueller wrote:
> Hi
>
> i am looking for a way to concatenate all values
> of query (that returns one varchar-field with multiple rows)
> into one string:
>
> e.g:
> select username from table_users
>
> returns:
> Miller
> Smith
> Frankfurter
> Gonzales
>
> i want:
> Miller;Smith;Frankfurter;Gonzales
>
> How can i 'SUM' strings, btw we are using ora 8i.
>
> Thanks for time and help,
> Alex

Note that depending on your data you run the risk of exceeding the limits of varchar. This might also be the reason that there is no CONCAT aggregate function...

If possible try to do something else.

Kind regards

    robert Received on Fri Feb 17 2006 - 06:35:41 CST

Original text of this message

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