Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to make 2 rows into 1 row?
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...Received on Tue Jul 02 2002 - 12:19:00 CDT
> 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
![]() |
![]() |