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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-09-19 : 07:43:48
|
faisal writes "suppose table as EMP columns as EMPID ,NAME, SALARY, DEPARTMENTsuppose Emp of 10 records & a person have two diffrenet records having in two diffrent DEPARTMENT,How would I get SUM OF salary of FAISAL who is in two diffrent DEPARTMENT.EMPID EMPNAME SALARY DEPARTMENT1 FAISAL 2000 COMPUTER2 AHMED 3000 CIVIL3 ABDUL 4000 ELECTRICAL4 ATEEQ 5000 MECHANIC5 FAISAL 1000 civil" |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-09-19 : 07:45:27
|
Suppose you try to figure out the correct SQL on your own, instead of asking people to do your homework for you.You've already got half of it with SUM, playing around with that should at least give you enough error messages to figure it out. |
|
|
|
|
|