SEM006 : Count of SQL modules
Introduction
Section titled “Introduction”Description
Section titled “Description”Metrics rule - counts CREATE statements of stored procedure, trigger, function and views.
How to fix
Section titled “How to fix”The rule is only informational.
The rule has a Batch scope and is applied only on the SQL script.
Parameters
Section titled “Parameters”Rule has no parameters.
Remarks
Section titled “Remarks”The rule does not need Analysis Context or SQL Connection.
Effort To Fix
Section titled “Effort To Fix”Not configured.
Categories
Section titled “Categories”Metrics
Additional Information
Section titled “Additional Information”There is no additional info for this rule.
Example Test SQL
Section titled “Example Test SQL”CREATE PROCEDURE testsp_CyclomaticComplexityTestASBEGIN TRY
IF (12 <1 ) SELECT 1 ELSE SELECT 2
END TRYBEGIN CATCH
IF (12 <1 ) SELECT 1 ELSE SELECT 2
END CATCH
IF (12 <1 ) SELECT 1ELSE IF (12 <1 ) SELECT 1 ELSE SELECT 2
RETURN;
IF (12>1) SELECT 4ELSE SELECT 5Analysis Results
Section titled “Analysis Results”| Message | Line | Column | |
|---|---|---|---|
| 1 | SEM006 : SqlModulesCount=1 | 1 | 0 |