Comments
Sort by recent activity
We would want the data consistently masked, for example the data may be extracted and used for reporting. One report might filter on the currency code where as another report might filter on the currency name, if the data is not consistently masked the first report would give you a different value for USD compared with the second report when selecting US Dollars. Your suggested solution might work if there were just one value per row but what if we had something like "Countries visited in last 90 days", this might have two countries with codes and names as separate elements, e.g. GBR/United Kingdom and USA/United States of America. Are we better off using XML "replace value of" via a SQL command rule? / comments
We would want the data consistently masked, for example the data may be extracted and used for reporting. One report might filter on the currency code where as another report might filter on the cu...
Still not working correctly in 10.0.1.12389. / comments
Still not working correctly in 10.0.1.12389.
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.