SA0140 : Reserved keyword is not in the requried case | ![]() |
The topic describes the SA0140 analysis rule.
Reserved keyword is not in the requried case
The rule checks T-SQL code for reserved keywords which do not use the required keyword case.
The parameter RequiredCase specifies the required case for the keywords.
NOTE: The rule excludes reserved keywords in datatypes such as varchar, nvarchar, int and etc.
The rule has a Batch scope and is applied only on the SQL script.
Name | Description | Default Value |
---|---|---|
RequiredCase | The parameter specifies the required case of the reserved keywords. | UPPERCASE |
The rule does not need Analysis Context or SQL Connection.
Naming Rules
There is no additional info for this rule.
1CREATE TABLE Test.Greeting 2( 3GreetingId INT identity (1,1) PRIMARY KEY, 4Message nvarchar(255) NOT NULL, 5) 6 7INSERT INTO Test.Greeting (Message) 8SELECT 'Hello!' 9UNION ALL 10SELECT 'Hi!' 11UNION ALL 12SELECT 'Hello, world!' 13 14insert into Test.Greeting (Message) 15values ('How do yo do?'), 16 ('Good morning!'), 17 ('Good night!') 18 19DELETE Test.Greeting wherE GreetingId = 3 20 21SELECT * FROM Test.Greeting g 22where 23g.Message like 'Hello%' 24 25drop TABLE Test.Greeting
Message | Line | Column | |
---|---|---|---|
1 | SA0140 : Reserved keyword is not in the requried case. | 3 | 15 |
2 | SA0140 : Reserved keyword is not in the requried case. | 14 | 0 |
3 | SA0140 : Reserved keyword is not in the requried case. | 14 | 7 |
4 | SA0140 : Reserved keyword is not in the requried case. | 15 | 0 |
5 | SA0140 : Reserved keyword is not in the requried case. | 19 | 22 |
6 | SA0140 : Reserved keyword is not in the requried case. | 22 | 0 |
7 | SA0140 : Reserved keyword is not in the requried case. | 23 | 10 |
8 | SA0140 : Reserved keyword is not in the requried case. | 25 | 0 |
© Ubitsoft Ltd. All Rights Reserved.