I would love to have the possibility to set the "AS" statement automatically for aliases in SQL and align them if desired.
Furthermore the option to duplicate the attribute name as alias for all attributes could help reading the SQL code as well.
Example:
select attribute1 , attribute_xy attribute2 , sum(blabla) sum_value , count(*) as counter from table1 group by 1,2;
This should be possible to format into:
select attribute1 as attribute1 , attribute_xy as attribute2 , sum(blabla) as sum_value , count(*) as counter from table1 as table1 group by 1,2;
I would really like to see an option to get AS. Although I'd prefer the option to add the AS to field alias separate from table alias. Oracle does not like AS on table alias.
Hi eklein86,
this option would be cool. But the beautifier will not change the code of the SQL. The parsing of SQL, DDL and Stored procedure is very complicated, a change of the code could have negative impacts.
Regards
Guido
Hello,
In regards to the theme "as" I would find it more helpfull in real live, deailing with huge SQLs changed by a lot of developers, when the format
function(column) AS newColumnName
column2 as newColumn2Name
could be translated into
newColumnName = function(column)
newColumn2Name = column2
That would make my life easier.
Regards Dieter