Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Concatanating results in one string
"Joe Smith" <nospam_at_nospam.com> wrote in message
news:aqtjts$s97$1_at_news-reader10.wanadoo.fr...
> Hi,
>
> I'm trying to do a query to return all the values in one column
concatanated
> as if it was only one result:
>
> Field
> ====
> "A"
> "B"
> "C"
>
>
> select ??? from table ==> "ABC"
>
> Is this possible?
> I've looked the SQL reference, but I can't find anything there (the concat
> function doesn't seem to allow this, does it?)
>
> I'm using Oracle 8.1.7
>
> Thanks in advance!
>
I've never seen anythign that would do that! you'll have to write a PL/SQL
function/procedure to do it prgramatically. Pass the query to it as a
parameter and it can return (using dynamic sql) the results you're after. I
suppose you could also do the usual gubbnins to ensure you can call the
function from within SQL statements.
I'm curious as to what the application is though. Why do you have one data item spread over multiple records? Received on Wed Nov 13 2002 - 07:43:31 CST
![]() |
![]() |