SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
COUNT(ALL|DISTINCT [column]) breaks 'align aliases' option

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
COUNT(ALL|DISTINCT [column]) breaks 'align aliases' option
Author Message
Mindflux



Joined: 25 May 2013
Posts: 805
Country: United States

Post COUNT(ALL|DISTINCT [column]) breaks 'align aliases' option Reply with quote
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):
Code:
SELECT CONVERT(VARCHAR(16) ,ar.RunStartDate ,1) AS StartDate
      ,COUNT(ars.TestNum)              AS DailyCount
      ,SUM(COUNT(ars.TestNum)) OVER()  AS SumOfTests



Bad:
Code:

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 View user's profile Send private message
Mindflux



Joined: 25 May 2013
Posts: 805
Country: United States

Post Reply with quote
Setting "Name Length for Alignment" to 0 fixed this. The default was 40.
Thu May 31, 2018 5:14 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.