formatting of OVER clause
Would like to control formatting of the OVER clause. E.g I would like the complete "(Partition by ... order by ...) as xyz" on one line, but today it's overrdden by other options.
-
Niels van de Coevering commented
This would be a great addition. My code is now formatted like beneath (underscores meant to be spaces), where the ORDER BY clause is creating a new line and I want an option to keep the OVER clause on one line.
SELECT
____ROW_NUMBER() OVER (PARTITION BY [Column1]
ORDER BY [Column1] ASC
_____________________________) AS Key
____,[Column2] -
Will commented
Is there any response to this? This is still an issue that breaks formatting when using the OVER clause. Specifically if you say OVER(PARTITION BY <X> ORDER BY<Y>)
For example this query (using _ to force indentation)
SELECT
_ [Name],
_ ROW_NUMBER() OVER (PARTITION BY [Name] ORDER BY [Name])
FROM
_ [#Table];gets formatted to this
SELECT
_ [Name],
_ ROW_NUMBER() OVER (PARTITION BY [Name]
ORDER BY [Name])
FROM
_ [#Table];