List "new line" behaviour not consistent with TOP operator
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" (note: brief test shows the same issue applies when this is set to "always").
With a normal multi-column query, this works fine:
However, if I include the TOP operator, this breaks:
I would expect the List items setting to work consistently for columns, regardless of the presence or absence of the TOP operator:
With a normal multi-column query, this works fine:
SELECT 1 AS x -- this is nice ,2 AS y ,3 AS z
However, if I include the TOP operator, this breaks:
SELECT TOP 1 1 AS x -- wrong spot!! Arrgh! ,2 AS y ,3 AS z
I would expect the List items setting to work consistently for columns, regardless of the presence or absence of the TOP operator:
SELECT TOP 1 1 AS x -- yes yes yes ,2 AS y ,3 AS z
Comments
The top clause has caused us quite a few problems. We'll look into getting this sorted.
It is possible to get this behaviour you want by setting the following option:
This won't keep it one line if there are multiple items, but you could combine this with the "Collapse statements shorter than x characters" option.
If this doesn't work for you, I'll take a look to see if the options could be reworked.
Best regards,
David