Click or drag to resize

SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior

The topic describes the SA0157 analysis rule.

Message

Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior

Description

The rule checks for usage of single part or two part column names in SELECT, UPDATE, DELETE, INSERT and MERGE statements.

The usage of three- or four-part column names in queries is deprecated.

It is recommended to change the query to use the standard-compliant two-part names.

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

Design Rules, Naming Rules, Deprecated Features

Additional Information
Example Test Script
SQL
 1SELECT 
 2       *,Database1..Table4.Column1
 3FROM 
 4     ..Table1,
 5     Schema1.Table2, Database1..Table3
 6     INNER JOIN Database1..Table4   
 7        ON Database1..Table4.Column1=Database1..Table3.Column1 AND 
 8           Database1..Table4.Column2=Database1.Schema1.Table1.Column2
 9     INNER JOIN Database1.Schema2.Table4 ON 
10           Database1..Table2.Column1=Database1..Table3.Column1 AND 
11           Database1..Table2.Column2=Database1.Schema1.Table1.Column2
12WHERE 
13      Database1.Schema1.Table1.Column1=Database1.Schema1.Table2.Column1 AND 
14      Database1.Schema1.Table3.Column1=Database1.Schema1.Table2.Column3  /*IGNORE:SA0157(LINE)*/

Analysis Results

 MessageLineColumn
1SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.29
2SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.711
3SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.737
4SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.811
5SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.837
6SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.1011
7SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.1037
8SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.1111
9SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.1137
10SA0157 : Usage of three and four part column names is deprecated. Two-part names is the standard-compliant behavior.136
...
See Also

Other Resources