SQL Queries - CAST Central Base - Queries on Metrics - How to get the technical criteria of the metric given the metric Id

Purpose of Query

The query will provide you with the list of Quality rule that has been added since a referenced version.

Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(question)
Microsoft SQL Server(question)
CSS(tick)
Query for CSS
SELECT tc.* 
FROM   dss_metric_type_trees T 
JOIN   dss_metric_types TC 
ON     t.metric_parent_id = tc.metric_id 
JOIN   dss_metric_types D 
ON     t.metric_id = d.metric_id 
AND    d.metric_id = <metric_id>
Query result example

66069;"Programming Practices - Unexpected Behavior";"Respect of structuredness practices";3;13;"";0;0;0

Query result interpretation

 The above example is applied on metric_id = 8114, The query returns the technical criteria id, name and description

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