Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 'SUM' strings to concatenated string
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