This query has been shared by a reader of my blog Kaushik Ghosh. It helps us to identify position and parent position for the specified division.
Can be really helpful in
- Support jobs involving creation of various positions.
- Avoid duplicate of Position creation
- Places where lot of divisions and positions exsist
Here is the query
SELECT X.NAME “Division”, A.NAME “POSITION”, A.ROW_ID, C.ROW_ID, C.NAME “PARENT POSITION” FROM
S_POSTN A, S_PARTY B, S_POSTN C, S_ORG_EXT X
WHERE X.NAME = ‘LSCA France’ AND C.ROW_ID (+) = B.PAR_PARTY_ID AND A.PAR_ROW_ID = B.ROW_ID
AND A.OU_ID = X.ROW_ID
In this query you can change the condition to X.NAME LIKE ‘L%’ which will return search for all the divisions starting with ‘L’.
Thanks Kaushik for sharing it with all. Keep them coming

1 Comment at "Identifying Positions based on divisions - SQL."
Very usefull query!
Thank You!
Comment Now!