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.
____ROW_NUMBER() OVER (PARTITION BY [Column1]
ORDER BY [Column1] ASC
_____________________________) AS Key
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)
_ ROW_NUMBER() OVER (PARTITION BY [Name] ORDER BY [Name])
gets formatted to this
_ ROW_NUMBER() OVER (PARTITION BY [Name]
ORDER BY [Name])