SA0269 : Datatype identifier is not in the required case

The topic describes the SA0269 analysis rule.

Message

Datatype identifier is not in the required case

Description

The rule checks T-SQL code for datatype identifiers which do not use the required keyword case.

The parameter RequiredCase specifies the datatype identifier case.

Scope

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

Parameters
Name Description Default Value
RequiredCase

The parameter specifies the required case of the reserved keywords.

lowercase

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

Naming Rules, Code Smells

Additional Information

There is no additional info for this rule.

Example Test Script
SQL
 1CREATE TABLE Test.Greeting
 2(
 3GreetingId [INT] identity (1,1) PRIMARY KEY,
 4Message [nvarchar](255) NOT NULL,
 5)
 6
 7CREATE TABLE Test.Greeting1
 8(
 9GreetingId int identity (1,1) PRIMARY KEY,
10Message nvarchar(255) NOT NULL,
11)
12
13CREATE TABLE Test.Greeting2
14(
15GreetingId Int identity (1,1) PRIMARY KEY,
16Message nvarChar(255) NOT NULL,
17)
18
19CREATE TABLE Test.Greeting1
20(
21GreetingId INT identity (1,1) PRIMARY KEY,
22Message NVARCHAR(255) NOT NULL,
23)

Analysis Results

  Message Line Column
1 SA0269 : Datatype identifier is not in the required case. 3 11
2 SA0269 : Datatype identifier is not in the required case. 15 11
3 SA0269 : Datatype identifier is not in the required case. 16 8
4 SA0269 : Datatype identifier is not in the required case. 21 11
5 SA0269 : Datatype identifier is not in the required case. 22 8
See Also

Other Resources