Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: display rows beside each-other
Hmmm... Possible, but is it really what you want to do?
The following article will explain how to join rows together into a string: http://builder.com.com/5102-6388-5259821.html
But how many of these names will you want to concatenate? Could the result go over 32,767 characters? If it can then the above solution will not work. You could extend this to return a CLOB and append into the clob instead of a varchar but really this is best handled on whatever client is executing the query by iterating over the result set and appending the names there.
"Ronald" <rmoleveld_at_hotmail.com> wrote in message
news:1113560286.548368.295880_at_z14g2000cwz.googlegroups.com...
> Hi all,
>
> A simplified example of my question.
>
> Normally this query:
>
> select name
> from emp
> where rownum <3
>
> will result in:
>
> NAME
> ----------
> Johnson
> Smith
>
> but Im looking a way to get this as result:
>
> Johnson Smith
>
> With or without the heading, doesn't matter.
>
> Is there a way to achieve this ?
>
> Thanks in advance !!
>
> Ronald.
>
Received on Fri Apr 15 2005 - 05:51:31 CDT