SQL Queries - CAST Measure Base - LOC

Purpose of Query

The queries in this section are run on the Measure Base to check the LOC stored.

Applicable CAST Version

ReleaseYes/No
8.3.x

Applicable RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS2

Query for CSS

SELECT DSSO.OBJECT_NAME   AS APPLICATION ,
       DSSS.SNAPSHOT_NAME AS SNAPSHOT    ,
       m.METRIC_NUM_VALUE AS "Number of Code Lines"
FROM   DSS_METRIC_RESULTS m
       JOIN DSS_OBJECTS DSSO
       ON     DSSO.OBJECT_ID=m.OBJECT_ID
       JOIN DSS_SNAPSHOTS DSSS
       ON     DSSS.SNAPSHOT_ID=M.SNAPSHOT_ID
--WHERE  M.SNAPSHOT_ID          = <snapshot_id> --uncomment and pass your snapshot id if you want to check for specific snapshot
AND    DSSO.OBJECT_type_ID    = -102 
AND    m.METRIC_ID            = 10151

Query result example

You can see the result as application name, snapshot name and LOC count as below

Query result interpretation

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