How can we help you today? How can we help you today?

Apply style on Partition by clause - aligning order by

This statement is formatting as follows (with the order by in column 1)
SELECT
How do I get it to align with the partition
SELECT
Matt Bolton
0

Comments

3 comments

  • Jessica R
    Hi MattB_SCA!

    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 R
    0
  • MattB_SCA
    Thanks for the response Jessica.

    I can now get it to:
        ,Row_Cnt = ROW_NUMBER() OVER (PARTITION BY A.part ORDER BY A.PDate DESC)
    which is better than the ORDER in the left column, but ideally I'd like the ORDER aligned under the PARTITION
        ,Row_Cnt = ROW_NUMBER() OVER (PARTITION BY A.part 
                                      ORDER BY A.PDate DESC)
    Matt
    MattB_SCA
    0
  • Jessica R

    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 R
    0

Add comment

Please sign in to leave a comment.