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:34:05 GMT
Message-ID: <nbKIa.900$XD.474@newssvr19.news.prodigy.com>


I belive Tom Kyte has described a cool way to create your own aggregate functions using object types and methods. But then again, this will be a piece of PL/SQL code standing behind a seemingly SQL solution...

"Isaac Blank" <izblank_at_yahoo.com> wrote in message news:CWJIa.896$NG.593_at_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:34:05 CDT

Original text of this message

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