 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
COUNT(ALL|DISTINCT [column]) breaks 'align aliases' option |
|
It seems having either keyword in the COUNT function breaks alignment of alias names for those columns with aliases.
Is there an easy fix for this one?
Good alignment (although not perfect, the top convert statement alias isn't aligned):
 |
 |
SELECT CONVERT(VARCHAR(16) ,ar.RunStartDate ,1) AS StartDate
,COUNT(ars.TestNum) AS DailyCount
,SUM(COUNT(ars.TestNum)) OVER() AS SumOfTests |
Bad:
 |
 |
SELECT CONVERT(VARCHAR(16) ,ar.RunStartDate ,1) AS StartDate
,COUNT(DISTINCTars.TestNum) AS DailyCount
,SUM(COUNT(DISTINCT ars.TestNum)) OVER() AS SumOfTests |
|
|
Thu May 31, 2018 4:22 pm |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
Setting "Name Length for Alignment" to 0 fixed this. The default was 40.
|
|
Thu May 31, 2018 5:14 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|