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 |
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2001-07-23 : 13:36:05
|
| I have an Employees Table withEmpNum, EmpName, EmpID, Manager, isAdminI also have a variable holding the current employee logged in to the system.This system only allows managers to log in.So if I want to get a list of Employees for that manager I do:SELECT Employees.EmpNum, Employees.EmpNum FROM Employees INNER JOIN Employees As Employees2 ON Employees.Manager = Employees2.EmpNameWHERE Employees2.EmpID = '123' How do I extend this query to show all the Employees if it's an Admin ( isAdmin = 1) |
|
|
|
|
|