How can we help you today? How can we help you today?

"New line" behavior in the FROM clause

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:
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.
a.higgins
0

Comments

1 comment

  • David Priddle
    Hi a.higgins,

    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
    David Priddle
    0

Add comment

Please sign in to leave a comment.