Greetings again experts,
I have the following tables:
Employees and Directors tables are look up tables and all records are inserted into Comp table.
My task is to show all the employees who belong to a particular department.
I am also required to show who the director of that department is.
The code so far is not producing the correct results.
Can you please help?
Thanks in advance
Select distinct d.empname as directorName, a.status,e.empnum,e.empname,e.department,e.unitName from Comp c inner join Directors d on d.deptnum = c.deptnumber inner join Employees e on c.empnum = e.empnum where c.status ='Done' and d.deptnum=@deptId