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: SQL Puzzle

Re: SQL Puzzle

From: Isaac Blank <izblank_at_yahoo.com>
Date: Fri, 20 Jun 2003 20:14:26 GMT
Message-ID: <CWJIa.896$NG.593@newssvr19.news.prodigy.com>


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

Original text of this message

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