Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to make 2 rows into 1 row?

Re: how to make 2 rows into 1 row?

From: Terry Dykstra <dontreply_tddykstra_at_forestoil.ca>
Date: Tue, 02 Jul 2002 17:19:00 GMT
Message-ID: <8glU8.12940$PN5.258032@news1.telusplanet.net>


One method:
select my.terminal, sum(my.rating1), sum(my.rating2),sum(my.addr), sum(my.prior), sum(my.adv) from (
select terminal, rating1, rating2, null addr,null prior, null adv from mytable
union all
select terminal, null, null,addr, prior, adv from mytable ) my
group by my.terminal

--
Terry Dykstra
Canadian Forest Oil Ltd.
"julio" <julio33_at_whomail.com> wrote in message
news:3d21dbcd$0$90827$45beb828_at_newscene.com...

> We have 2 rows of data. They are for the same item but have different
data
> and we want 1 row. Does Sajar know?
>
>
>
>
>
> Terminal rating1 rating2
> 1234 23 34
>
>
> Terminal addr prior adv
> 1243 54 67 39
>
>
> we want
>
> Terminal rating1 rating2 addr prior adv
> 1243 23 34 54 67 39
>
> Julio and Colin and Lyse
>
> See my babies at
>
> http://www.geocities.com/colin_and_lyse/colin_lyse.html
Received on Tue Jul 02 2002 - 12:19:00 CDT

Original text of this message

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