I’m troubling making the formmater align keywords in ANSI SQL.
In the higlight part the join and on keyword should be aligned with the from
I want to make it like this
Any help is great…
I’m troubling making the formmater align keywords in ANSI SQL.
In the higlight part the join and on keyword should be aligned with the from
I want to make it like this
Any help is great…
Aligning all keywords in a same column doesn’t contribute much to the primary goal of formatting, which making code easier to understand. At least that should be the primary goal, IMHO. The indentation in the right hand side of the FROM keyword should clearly show from which table references data is obtained. Yes, in the WHERE clause we added a way to align the AND keywords the way you’d like to align the join, but that’s a less complex part of the statement. I just wonder how we should align more complex nested and/or chained joins.
Thoughts always welcome,
Andre
I Andre, I don't agree with you because if there are a lot of joins is difficult to understand which tables and which joins are being made. Also look at some of the joins that are on the same line as the table, I also find that confusing.
I prefer the second image (that I formatted by hand) instead of the first one.
Formatted by application
Formatted by hand