Purpose of Query
The SQL query in this page lists the Datafunctions id that are part of a nested merge.
For example a datafunction being both a merge root for one merged item and merged item for another merge root is part of a nested merge.
- The Datafunction 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 Datafunction being a merged item is the data function that has been merged as a child 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 DF2.object_id FROM dss_datafunction DF1, dss_datafunction DF2 WHERE ( DF1.object_id != DF1.cal_mergeroot_id ) AND ( ( DF1.cal_flags & 6 ) != 6 ) AND ( DF2.object_id != DF2.cal_mergeroot_id ) AND ( ( DF2.cal_flags & 6 ) != 6 ) AND ( ( DF1.cal_flags & 4 ) = 4 ) AND ( DF2.object_id = DF1.cal_mergeroot_id ) AND ( ( DF2.cal_flags & 4 ) = 4 ) ORDER BY DF1.object_id;
Query result example
7397329
Query result interpretation
The above result return the id of the data function being both a merge mother for one or several merged child and merged child for another merge mother.
The remediation is as follow:
Create table fp_wk_calib_issues as follows:
RemediationCREATE TABLE fp_wk_calib_issues ( appli_id INTEGER NOT NULL, description CHARACTER varying(500) NOT NULL, calib_issue_num serial NOT NULL ) WITH ( oids=FALSE );ALTER TABLE fp_wk_calib_issues owner TO operator;
Create function CAST_LOG as follow:
RemediationCREATE OR REPLACE function cast_log(message VARCHAR) returns void AS $body$ begin INSERT INTO dss_history ( description ) VALUES ( LEFT(message,500) ); -- avoid SQL Error "value too long for type character varying(500)"END;$body$ language 'plpgsql'
Install the following script DSSAPP_FP_FIX_CALIB_ISSUES.sql
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