"New line" behavior in the FROM clause
a.higgins
Posts: 90 Bronze 2
Under Global --> Lists --> List Items, I have the "Place first item on new line" option set to "if there are subsequent items".
When I try to format the following query, the first table name in my FROM clause is left on the same line:
However, if I set the "Place first item on new line" option to "Always", the table moves down to the line after the FROM:
I'm not sure what's driving this behavior, exactly, but I would expect that when referencing two or more tables in the FROM clause, the "if there are subsequent items" option would trigger and dictate that the first table be placed on a new line, as in the "Always" example code above.
When I try to format the following query, the first table name in my FROM clause is left on the same line:
SELECT tables.name ,columns.name FROM sys.tables LEFT OUTER JOIN sys.columns ON tables.object_id = columns.object_id
However, if I set the "Place first item on new line" option to "Always", the table moves down to the line after the FROM:
SELECT tables.name ,columns.name FROM sys.tables LEFT OUTER JOIN sys.columns ON tables.object_id = columns.object_id
I'm not sure what's driving this behavior, exactly, but I would expect that when referencing two or more tables in the FROM clause, the "if there are subsequent items" option would trigger and dictate that the first table be placed on a new line, as in the "Always" example code above.
Comments
We've had feedback both ways to count or not count JOINs as a subsequent item, so we'll look into adding an option so people can choose.
Best regards,
David