when aggregating add alias
when doing simple aggregation such as sum(column), it would be nice if the column name would be aliased after the agg automatically. if this is a single column in the function then make the alias the column name. when multiple then create square brackets and move cursor into bracket after closing agg with a ")"
ben b commented
it would be great if you could highlight a load of column names in a SELECT statement and encapuslate them all with sum() as OriginalColumnName
sum(TransactionAmountA) as TransactionAmountA,
sum(TransactionAmountB) as TransactionAmountB
you could then add the group by yourself using your 'all non aggregated' feature.
i regularly deal with fact tables with 20+ measures, real chore :)
This would be handy, especially when used in conjunction with encapsulating as a CTE. As always, we would need a naming convention configuration screen to define how the aliases are created.
Sum(ColA) as SumColA
IsNull(ColA,'Something') as ColA
IsNull(ColA,ColB) [no suggestion]
David Tombs commented
Possible create the alias as FUNC_Column ie SUM(Total_Amt) as SUM_Total_Amt. For ISNULL just alias as the column name ie isnull(Total_Amt) as Total_Amt