I’m trying to get an extract of the ConfigDB where I can see the following:
| Employee ID | Actual Folder | Parent Folder (1up) | Parent Folder (2up) |
| Test_0001 | Test | Berlin | Persons |
I want to get that information because we have a good folder structure,
but especially for Admin or Supervisor accounts we don’t have a good naming
convention. So I cannot get the location where a person belongs to based on the Employee ID.
Does anybody know how an easy way would look like?
I know that there is no real meaning of the folder structure.
But looking at the tables CFG_FOLDER and CFG_OBJ_FOLDER I thought that might be a possibility to use it.
Edit.
I’ve solved it now, for everybody who is interested:
SELECT
PERSON.EMPLOYEE_ID, FOLDER.NAME AS FOLDER, FOLDER2.NAME AS ONEUP, FOLDER3.NAME AS ONEUP
FROM
CFG_PERSON PERSON
-- MAIN FOLDER
JOIN CFG_OBJ_FOLDER OBJ
ON OBJ.OBJECT_DBID = PERSON.DBID AND OBJ.OBJECT_TYPE = 3
JOIN CFG_FOLDER FOLDER
ON OBJ.FOLDER_DBID = FOLDER.DBID
-- ONE UP
JOIN CFG_OBJ_FOLDER OBJ2
ON OBJ2.OBJECT_DBID = OBJ.FOLDER_DBID AND OBJ2.OBJECT_TYPE = 22
JOIN CFG_FOLDER FOLDER2
ON OBJ2.FOLDER_DBID = FOLDER2.DBID
-- TWO UP
JOIN CFG_OBJ_FOLDER OBJ3
ON OBJ3.OBJECT_DBID = OBJ2.FOLDER_DBID AND OBJ3.OBJECT_TYPE = 22
JOIN CFG_FOLDER FOLDER3
ON OBJ3.FOLDER_DBID = FOLDER3.DBID