Click or drag to resize

SA0073B : Check all User-Defined Types for following specified naming convention. (Batch)

The topic describes the SA0073B analysis rule.

Message

Check all User-Defined Types for following specified naming convention. (Batch)

Description

The rule checks the type name in CREATE TYPE statements.

The NamePattern variable can be used to select or configure the desired pattern which will be used to check the object name.

Regular expression patterns can be used, but the pattern must be prefixed with 'regexp:' string in order to be used as a matching regular expression.

Scope

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

Parameters
NameDescriptionDefault Value
NamePattern

Deault constraint name pattern.

regexp:[A-Z][A-Za-z]+

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

Naming Rules, New Rules

Additional Information

There is no additional info for this rule.

Example Test Script
1CREATE TYPE SSN  
2FROM varchar(11) NOT NULL ;  
3
4CREATE TYPE Utf8String   
5EXTERNAL NAME utf8string.[Microsoft.Samples.SqlServer.utf8string] ;  
6
7CREATE TYPE LocationTableType AS TABLE   
8    ( LocationName VARCHAR(50)  
9    , CostRate INT );

Analysis Results

 MessageLineColumn
1SA0073B : The user defined type name Utf8String does not match the naming convention. The expected name is [[A-Z][A-Za-z]+].412
See Also

Other Resources