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 |
|
sqlamith
Starting Member
2 Posts |
Posted - 2011-02-27 : 21:55:19
|
| Hello,I am new to query programming. I am working on one assignment.Question:This table has employee list with their salary and their managers.Select all the empid's whose salary is greater than their managersempid salary manager emp id1000 10000 10041001 20000 10041003 30000 10041004 25000 10051005 24000 10061006 40000 ----Select all the empid's whose salary is greater than their managers.Would appreciate any suggestions/response.Thanks,am |
|
|
sqlamith
Starting Member
2 Posts |
Posted - 2011-02-27 : 22:04:45
|
| Hello,I am new to query programming. I am working on one assignment.Question:This table has employee list with their salary and their managers.Select all the empid's whose salary is greater than their managersempid salary manager emp id1000 10000 10041001 20000 10041003 30000 10041004 25000 10051005 24000 10061006 40000 ----Select all the empid's whose salary is greater than their managers.Would appreciate any suggestions/response.Thanks,am |
 |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2011-02-27 : 23:16:49
|
quote: Originally posted by sqlamith Hello,I am new to query programming. I am working on one assignment.Question:This table has employee list with their salary and their managers.Select all the empid's whose salary is greater than their managersempid salary manager emp id1000 10000 10041001 20000 10041003 30000 10041004 25000 10051005 24000 10061006 40000 ----Select all the empid's whose salary is greater than their managers.Would appreciate any suggestions/response.Thanks,am
Can you show us what you have tried.You will get idea on how to start by having a look at following weblink:http://en.wikipedia.org/wiki/Correlated_subquery |
 |
|
|
|
|
|