SQL Queries - CAST Knowledge Base - Corruptions - Corruptions on datafunctions - How to find the objects id of Datafunction which is merged with itself

Purpose of Query

The SQL query in this page lists the objects id of data functions that present a self merge.

Applicable CAST Version
Release
Yes/No
8.3.x(tick)
Applicable RDBMS
RDBMS
Yes/No
CSS(tick)
Query for CSS
SELECT object_id
FROM   dss_datafunction
WHERE  object_id = cal_mergeroot_id
ORDER  BY object_id;
Query result example
 7397329
Query result interpretation
The above result return the ID of the data function that present a self merge

In order to fix this "self-merge" you can correct the Data Function's Calibration by running the below query on the analysis service then compute the function points and load results.

Remediation
UPDATE dss_datafunction 
SET    cal_mergeroot_id = 0, 
       cal_flags = ( cal_flags - ( cal_flags & 4 ) ) 
WHERE  object_id = cal_mergeroot_id 
Notes/comments