Comments
Sort by recent activity
Still not completely fixed, the below SQL now formats fine: <div>SELECT TRIM('AW' FROM [dc].[CustomerAlternateKey]) AS [CustomerAlternateKey] , [dc].[CustomerKey] FROM [dbo].[DimCustomer] AS [dc];</div>
However, when TRIM is not in the first column "Format SQL" fails with "Exception: Cannot align to a future token "AW" at line 2, column 10, offset 37", e.g.:
<div>SELECT [dc].[CustomerKey], TRIM('AW' FROM [dc].[CustomerAlternateKey]) AS [CustomerAlternateKey] FROM [dbo].[DimCustomer] AS [dc];</div>
I'm using 9.5.19.11631.
/ comments
Still not completely fixed, the below SQL now formats fine:<div>SELECT TRIM('AW' FROM [dc].[CustomerAlternateKey]) AS [CustomerAlternateKey] , [dc].[CustomerKey] FROM [dbo].[DimCustomer] AS [...
Still not working correctly in 9.5.23. / comments
Still not working correctly in 9.5.23.
@Dan B your screenshot is from the installer, not the application, as can be seen from the file names and sizes. / comments
@Dan B your screenshot is from the installer, not the application, as can be seen from the file names and sizes.
Thanks @Tianjiao_Li, I believe this was already logged under SP-6941. / comments
Thanks @Tianjiao_Li, I believe this was already logged under SP-6941.
Hi @RichardL I get the same result: [image] / comments
Hi @RichardL I get the same result:
I am using 9.1.6, this is what I get when I "Format SQL":
SELECT
[town]
, STRING_AGG([email], ';') WITHIN GROUP(
ORDER BY [email] ASC) AS [emails]
FROM [dbo].[Employee]
GROUP BY [town];
I would expect STRING_AGG to be treated in the same way as RANK:
SELECT
[town]
, STRING_AGG([email], ';') WITHIN GROUP(ORDER BY [email] ASC) AS [emails]
, RANK() OVER (PARTITION BY [town] ORDER BY [email]) AS [RNK]
FROM [dbo].[Employee]
GROUP BY [town];
I don't get an error, I just don't get the expected result when I "Format SQL".
/ comments
I am using 9.1.6, this is what I get when I "Format SQL":
SELECT
[town]
, STRING_AGG([email], ';') WITHIN GROUP(
ORDER BY [email] ASC) AS [emails]
FROM [dbo].[Employee]
GROUP BY [town];
I wo...
The ORDER BY of the WITHIN GROUP seems to be treated as a query ORDER BY and does not get indented inline with STRING_AGG/WITHIN GROUP. / comments
The ORDER BY of the WITHIN GROUP seems to be treated as a query ORDER BY and does not get indented inline with STRING_AGG/WITHIN GROUP.
Same issue with TRIM, I'm using 9.0.4.3408. / comments
Same issue with TRIM, I'm using 9.0.4.3408.