Home » SQL & PL/SQL » SQL & PL/SQL » how to have multiple lines with 2 colums
how to have multiple lines with 2 colums [message #20469] Mon, 27 May 2002 11:44 Go to next message
Philippe
Messages: 7
Registered: May 2002
Junior Member
Hi all,
I have a table T with 4 columns
Col1, Col2, Value1, Value2
C1, , 1,
C1, C3, 1, 1
C2, C1, 3, 2
.....
I want a result like
C1, 4
C2, 3
C3, 1
I've tried
select C1, sum(value1) from T group by C1
UNION [[ALL]]
select C2, sum(value2) from T group by C2
but i got something like
C1, 2
C2, 3
C1, 2
C3, 1
can somebody help me?
Re: how to have multiple lines with 2 colums [message #20474 is a reply to message #20469] Mon, 27 May 2002 21:45 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
actually,
i dont understand your requirement.can you please give an example
Previous Topic: Re: About computation on two columns values
Next Topic: plss help me i'll be grateful to u
Goto Forum:
  


Current Time: Thu Apr 25 15:01:13 CDT 2024