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.
![](https://secure.gravatar.com/avatar/b17502fb6eaeadeb76b6b47c7a032a86?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
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];