Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Anushka
Yak Posting Veteran
79 Posts |
Posted - 2008-04-23 : 04:38:01
|
| select i.a,w.c,w.e from table1 i,table2 w where i.a=w.a (Here c is the primary key for each a)-iam getting o/p like this a c eaaa x 2aaa y 10bbb y 5 ccc x 3ccc y 4i need o/p in this way (ie sum of e for each a)a eaaa 12bbb 5 ccc 7Is it possibleThanx |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2008-04-23 : 04:56:11
|
Something like...select i.a, sum(w.e) as e from table1 i inner join table2 w on i.a = w.a group by i.a Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
|
|
|