Click or drag to resize

SA0218 : The '::' function calling syntax is deprecated

The topic describes the SA0218 analysis rule.

Message

The '::' function calling syntax is deprecated

Description

The rule checks T-SQL code and reports usages of the deprecated built-in function calling syntax '::'.

The calling of system function using the ::funciton_name() syntax is now deprecated and can be replaced with sys.function_name().

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

New Rules, Deprecated Features

Additional Information
Example Test Script
SQL
1-- Deprecated syntax usage.
2SELECT * FROM ::fn_virtualfilestats(2,1) 
3
4-- Correct function call syntax.
5SELECT * FROM sys.fn_virtualfilestats(2,1)

Analysis Results

 MessageLineColumn
1SA0218 : The '::' function calling syntax is deprecated.216
See Also

Other Resources