Click or drag to resize

SEM003 : Statements count

The topic describes the SEM003 analysis rule.

Message

Statements count

Description

Metrics rule - count of statements.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

Metrics

Additional Information

There is no additional info for this rule.

Example Test Script
SQL
 1-- non-ANSI inner join syntax: 
 2SELECT     a.au_id ,
 3           t.titlr e
 4FROM       titles AS t ,
 5           authors AS a ,
 6           titleauthor AS ta
 7WHERE      a.au_id = ta.au_id
 8       AND ta.title_id = t.title_id
 9       AND t.title LIKE 'Example%'
10
11-- ANSI inner join syntax: 
12
13/*
14SELECT     a.au_id ,
15           t.title
16FROM       authors AS a
17INNER JOIN titleauthor AS ta
18ON         a.au_id = ta.au_id
19INNER JOIN titles AS t
20ON         ta.title_id = t.title_id
21WHERE      t.title LIKE 'Example%'*/
22
23
24SELECT     a.au_id ,
25           t.title
26FROM       authors AS a
27INNER JOIN titleauthor AS ta
28ON         a.au_id = ta.au_id
29INNER JOIN titles AS t
30ON         ta.title_id = t.title_id
31WHERE      t.title LIKE 'Example%' -- Ignore

Analysis Results

 MessageLineColumn
1SEM003 : StatementsCount=200
See Also

Other Resources