This does not fix already missing records, but will prevent form occurring again.
Following query will help identifying the investments where the SELF record is missing:
Select
INV.ID,
Inv.Code,
INV.NAME
From
Inv_Investments Inv
Where
NOT EXISTS (SELECT 1 FROM INV_HIERARCHIES IFH WHERE IFH.PARENT_ID IS NULL AND IFH.CHILD_ID = INV.ID)
In order to fix missing records, please follow steps below:
- Download the attached ADD_MISSING_SELF_ROWS.zip file
- Unzip the ADD_MISSING_INV_HIERARCHIES_SELF_ROWS.xml file
- Place it on a temp folder on the PPM server
- Through command line, navigate to the temp folder above
- Run the following command:
dbpatch -install -file ADD_MISSING_INV_HIERARCHIES_SELF_ROWS.xml -apply