Hi,
I’d like to report what appears to be an issue with SQL Prompt formatting related to CLR method calls.
Problem
When formatting T-SQL code that calls a CLR method using the scope resolution operator (::), SQL Prompt automatically uppercases the method name.
Example:
DECLARE @MappingRule dbo.EntityInstanceMappingRule;
SELECT @MappingRule = dbo.EntityInstanceMappingRule::Get(
CONVERT(uniqueidentifier, '01234567-89AB-CDEF-0123-456789ABCDEF')
);
After formatting, SQL Prompt changes:
::Get
to:
::GET
Why this is problematic
The identifier after :: is not a T-SQL keyword.
It is a .NET CLR method, and therefore case-sensitive.
Changing Get to GET is not just a stylistic modification — it can break code or cause mismatches in environments where CLR methods rely on case sensitivity.
The formatter appears to treat the token after :: as a regular identifier or keyword, but in this context it represents a CLR member and should not have its casing altered.
Environment
- SQL Prompt version: 11.3.6.21421
- SQL Server Management Studio: 22.3.2
- OS: Windows 11 Pro 24H2
- .NET Framework: 4.0.30319.42000
Hi,
I’d like to report what appears to be an issue with SQL Prompt formatting related to CLR method calls.
Problem
When formatting T-SQL code that calls a CLR method using the scope resolution operator (
::), SQL Prompt automatically uppercases the method name.Example:
After formatting, SQL Prompt changes:
to:
Why this is problematic
The identifier after
::is not a T-SQL keyword.It is a .NET CLR method, and therefore case-sensitive.
Changing
GettoGETis not just a stylistic modification — it can break code or cause mismatches in environments where CLR methods rely on case sensitivity.The formatter appears to treat the token after
::as a regular identifier or keyword, but in this context it represents a CLR member and should not have its casing altered.Environment