vickey_dw
New User
Joined: 10 Jun 2015 Posts: 51 Location: India
|
|
|
|
Hi All,
Table1 contains details of employee which i want to fetch based on comman key Sap id in table2.
I have written below query to fetch the details of a employee and its reporting maneger(RM)
Code: |
Select
A.Name
,A.Lastname
,A.Empid
,A.Telephone'
,B.Designation
,A.RM
,D.Name
,D.Lastname
,D.Empid
,D.Telephone
,D.RM
from Table1 A
,Table2 B
Left Join Table1 D
on D.Empid = A.RM
Where
A.Empid = '219057'
And B.Sapid = A.Sapid |
But i am facing problem to fetch designation of RM(Reporting manager) in above query as its present in table2. Please help me with this. |
|