I have table named employees.
ID Name Surname ManID Emp11 Jan Helen Emp13 Emp12 Koos Dup Emp13 Emp13 Liezel Lubbe Emp12
Meaning Jan Helen, Koos Dup Managers is Liezel Lubbe and Liezel Manager is Koos Dup.
Now I want the manager Name and Surnames with just one query, I did this and it working fine.
select a.Employee_ID as ID,a.Employee_Name as Name,a.Employee_Surname as Surname,b.Employee_ID as ManagerID, ,b.Employee_Name as ManagerName,b.Employee_Surname as ManagerSurname from dbo.lms_Employee a, dbo.lms_Employee b where a.Employee_Manager = b.Employee_ID
My problem now is that I get this results.
Emp13 Liezel Lubbe Emp13 Liezel Lubbe Emp12 Koos Dub
I want to display the results in grid view but I only want one result like :
Emp13 Liezel Lubbe Emp12 Koos Dub
So in my statement I want to remove the duplicates selected.
Hope can assist me.