Comments
3 comments
-
Hi Per,
Thank you for your post.
We've been able to reproduce this locally, so it will be escalated to the development team for a fix.
-
Hi Per,
The Dev team have advised that the issue you are seeing is due to using an incorrect syntax for TRIM. The syntax for SQL Server 2022 (16.x) and earlier versions, Azure SQL Database, and Azure Synapse Analytics:
TRIM ( [ characters FROM ] string )From https://learn.microsoft.com/en-us/sql/t-sql/functions/trim-transact-sql?view=azuresqldb-current
the given example there is:
SELECT TRIM( '.,! ' FROM ' # test .') AS Result;The syntax for SQL Server 2022 (16.x) and later versions, Azure SQL Managed Instance, and Microsoft Fabric:
TRIM ( [ LEADING | TRAILING | BOTH ] [characters FROM ] string )
-
I have the database compatibility level set to 160, so the syntax with leading/trailing/both is correct, but the formatting is incorrect.
Add comment
Please sign in to leave a comment.
Before formatting
After formatting when connected to Microsoft SQL Server 2022 (RTM-GDR) (KB5029379) - 16.0.1105.1 (X64)
After formatting when connected to Microsoft SQL Azure (RTM) - 12.0.2000.8
lEaDiNg
is not cased correctly