Apply style on Partition by clause - aligning order by
MattB_SCA
Posts: 4 New member
in SQL Prompt
This statement is formatting as follows (with the order by in column 1)
SELECT<br> cols<br> ,Row_Cnt = ROW_NUMBER() OVER (PARTITION BY A.part<br>ORDER BY A.PDate DESC<br> )<br>FROM<br> table AHow do I get it to align with the partition
SELECT<br> cols<br> ,Row_Cnt = ROW_NUMBER() OVER (PARTITION BY A.part<br> ORDER BY A.PDate DESC<br> )<br>FROM<br> table A
Tagged:
Answers
I can get that formatting with the following:
- Data>Clauses> set "Clause alignment" to " to statement"
- Parentheses>Short parentheses contents> disable 'Collapse parentheses if contents are shorter than x characters"
Can you please give this a try?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
I can now get it to:
which is better than the ORDER in the left column, but ideally I'd like the ORDER aligned under the PARTITION
Matt
No worries, Matt!
I think that disabling Data (DML)>Subqueries>"Collapse subqueries shorter than x characters" will do the trick for you- can you please give this a try?
If not, I've attached an example style that should format it as you're looking for:
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?