Re: How to show a select in one row
From: L8tr0n <l8tr0n_at_my-deja.com>
Date: Wed, 15 Sep 1999 13:35:56 GMT
Message-ID: <7ro7br$d1p$1_at_nnrp1.deja.com>
FROM (
FROM toto)
Date: Wed, 15 Sep 1999 13:35:56 GMT
Message-ID: <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 Wed Sep 15 1999 - 15:35:56 CEST