Hi Prakash
I branched your question in a separate topic as the issue is with a different error message and is not related to the same problem, we can deal with it here. You have the error:
ORA-30926: unable to get a stable set of rows
when running Data Warehouse, this usually happens when the lookup is poorly configured and returns duplicated values. Data Warehouse does not tolerate duplicate values.
I looked in your query and ran it as SQL (without the INV ID clause as DWH will not have this):
SELECT
INV.MANAGER_ID,
SRM.FULL_NAME,
INV.LAST_UPDATED_BY,
INV.LAST_UPDATED_DATE
FROM
INV_INVESTMENTS INV, INV_PROJECTS PRJ,SRM_RESOURCES SRM
WHERE
INV.ID=PRJ.PRID
AND SRM.USER_ID=INV.MANAGER_ID
AND PRJ.IS_TEMPLATE=0
AND (INV.PURGE_FLAG=0 OR INV.PURGE_FLAG IS NULL)
AND INV.is_active=1
Your lookup has the potential to return duplicate records. In CA PPM they won't be visible as they're taken care of with the parameters but when you run this:
SELECT LAST_UPDATED_DATE AS CLARITY_UPDATED_DATE,
MANAGERID AS JS_GIV_MANAGER1_KEY,
MANAGER_NAME AS JS_GIV_MANAGER1,
to_date('2017/01/19 16:22:49', 'yyyy/mm/dd HH24:MI:SS') AS dw_updated_date
FROM DWH_LKP_JS_GIV_MANAGER1_V@DBLINK
You only select the last_updated_date, manager_id, and manager_name. This is the query DWH runs.
You have few options here:
1. To fix the issue add another field in the select query to make each result unique. In your case I believe it will be enough to add INV_ID to the select statement, it depends on how you use the field.
If your lookup is in use it would be better to correct it via XOG.
Then once you're ready, add the field again to Data Warehouse and run a Full Load.
2. If you're not sure how to do it, or just want to have your job fixed for now, just uncheck the field and run a Full Load of the Data Warehouse. Please note that before enabling any new custom fields on Production we recommend to test this on Test or Dev environment first. Once you're ready, enable and test.
3. This error should no longer be reproducible on 15.1 and higher. If you upgrade you should not face the issue anymore. You may uncheck the field until upgrade if that's something that can happen soon.
Hope this helps -Nika