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: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Fri, 17 Feb 2006 20:49:29 +0100
Message-ID: <dt58ku$nec$2@news2.zwoll1.ov.home.nl>


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

summing would be the SQL Server way; concatenation is done using the '+' character. Oracle uses the vertical bar (|).

And pivoting, as already mentioned.

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Fri Feb 17 2006 - 13:49:29 CST

Original text of this message

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