Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to show a select in one row
same code using max() returns the string values
L8tr0n <l8tr0n_at_my-deja.com> wrote in message
news:7ro7br$d1p$1_at_nnrp1.deja.com...
> Close, but you are missing on thing..
>
> SELECT SUM("1") as "1",
> SUM("2") as "2",
> SUM("3") as "3"
> FROM (
> SELECT DECODE(id,'1',1,0) AS "1",
> DECODE(id,'2',2,0) AS "2",
> DECODE(id,'3',3,0) AS "3"
> FROM toto)
>
> would return
>
> 1 2 3
> --- --- ---
> 1 2 3
>
> That works if you have numbers...WARNING in 8i there are bugs in
> parallel query when running this type of statement...
>
> Hope this helps...
>
>
> > Jorge wrote:
> > >
> > > something like this:
> > > select * from toto
> > > id
> > > ---
> > > 1
> > > 2
> > > 3
> > >
> > > select * from toto
> > > id
> > > ---
> > > 123
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Mon Sep 27 1999 - 20:01:07 CDT
![]() |
![]() |