Purpose of Query
The SQL query in this page lists the Data Function id being a merge child without a merge mother or its merge mother is not a Data Function
- The Data Function being a merge root is the data function that has been merged with others, and it is the root of the merge, so it appears on the dashboard and TCC
- The Data Function being a merged item is the data function that has been merged as a item of another one, so it does not appear in the dashboard and TCC
Applicable CAST Version
Release | Yes/No |
---|---|
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x |
Applicable RDBMS
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS2 |
Query for CSS
SELECT DF1.Object_ID FROM DSS_DataFunction DF1 WHERE NOT EXISTS (SELECT 1 FROM DSS_DataFunction DF2 WHERE DF2.Object_ID = DF1.cal_Mergeroot_ID) ORDER BY DF1.object_id;
Query result example
7397329
Query result interpretation
The above result return the id of the data function being a merge child without a merge mother or its merge mother is not a datafunction
You can run the following query for fixing the corruption please
Remediation
UPDATE DSS_DataFunction DF1 set DF1.cal_flags = cal_flags - ( DF1.cal_flags & 4 ), DF1.cal_Mergeroot_ID =0 WHERE NOT EXISTS (SELECT 1 FROM DSS_DataFunction DF2 WHERE DF2.Object_ID = DF1.cal_Mergeroot_ID)
Query for Oracle
Enter the SQL query
Query result example
Query result interpretation
Query for SQL server
Enter the SQL query
Query result example
Query result interpretation
Notes/comments
Related Pages