The new format action for applying column alias style is simply incredible: as one of the people that submitted requests for that, let me say thank you!
Is there a way to extend this functionality to automatically add the alias for all columns, even those that currently do not have an alias defined?
For example, my current preferred alias style is "alias = column". Now that SQL Prompt has the ability to align aliases, I've gotten into the habit of explicitly defining an alias for every column, even if the alias is the same as the underlying field.
I'd like SQL Prompt to take an input query like this:
;WITH CTE AS
(
SELECT
a = 1
,b = 2
,c = 3
)
SELECT
CTE.a
,CTE.b
,TOTAL = CTE.a + CTE.b - CTE.c
FROM CTE
and turn it into
SELECT
a = CTE.a
,b = CTE.b
,TOTAL = CTE.a + CTE.b - CTE.c
FROM CTE
Is there a way to extend this functionality to automatically add the alias for all columns, even those that currently do not have an alias defined?
For example, my current preferred alias style is "alias = column". Now that SQL Prompt has the ability to align aliases, I've gotten into the habit of explicitly defining an alias for every column, even if the alias is the same as the underlying field.
I'd like SQL Prompt to take an input query like this:
and turn it into