Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Puzzle
That would work only if you know in advance the number of srings to
concatenate.
"Malcolm Dew-Jones" <yf110_at_vtn1.victoria.tc.ca> wrote in message
news:3ef35bca_at_news.victoria.tc.ca...
> One strategy to get multiple rows into one row is to union some queries,
> putting data into different columns, and then using a group function on
> each column to get all the data into a single row. No idea if this would
> help at all here, or be appropriate, and there could be other ways, this
> one just springs to mind.
>
> example
>
> select max(A),max(B),max(C)
> from
> (
> select table_name A,'' B,'' C from replicate_control where sequence_number
> = 1
> union all
> select '',table_name,'' from replicate_control where sequence_number = 2
> union all
> select '','',table_name from replicate_control where sequence_number = 3
> )
>
Received on Fri Jun 20 2003 - 15:14:26 CDT
![]() |
![]() |