Hello Experts , i have one requirement to set look up for employee so once employee name will be chose respected department and company will come automatically. i was trying to figure out the relation between the table to get those details but couldn't find anything. please advise i am, using below quarries.
Not Working :
SELECT A.PERSONNELNUMBER, E.NAME AS 'WORKER NAME', D.NAME AS 'DEPARTMENT'
FROM HCMWORKER A LEFT OUTER JOIN HCMPOSITIONWORKERASSIGNMENT B ON B.WORKER = A.RECID
LEFT OUTER JOIN HCMPOSITIONDETAIL C ON C.POSITION = B.POSITION
INNER JOIN DIRPARTYTABLE D ON C.DEPARTMENT = D.RECID
INNER JOIN DIRPARTYTABLE E ON A.PERSON = E.RECID
For getting employ name i am using this and its working
select DP.NAME,* from HCMWORKER h, DIRPARTYTABLE DP where h.PERSON = DP.RECID
Thank you