OVER () formatting

chrisw13chrisw13 Posts: 6
edited July 2, 2013 12:55PM in SQL Prompt Previous Versions
When formatting TSQL with a n OVER() statement, the following line is aligned with the () rather than to the left...

An arbitrary example. You'll need to view in fixed width font (ssms) to see alignment.
-- sys.indexes alligned propertly under *
SELECT  *
FROM    sys.indexes


-- qty2, * and sys.indexes improperly alligned
SELECT  qty = COUNT(*) OVER ()
                            ,qty2 = SUM(CAST(is_unique AS INT)) OVER ()
                                                                     ,*
FROM                                                                  sys.indexes

-- Using comments to help formatting, but there's still a stair step affect
SELECT  qty = COUNT(*) OVER -- 
        ()
        ,qty2 = SUM(CAST(is_unique AS INT)) OVER --
         ()
         ,*
FROM      sys.indexes

-- More comments to provide more accurate formatting
SELECT  qty = COUNT(*) OVER -- 
/*  */ ()
       ,qty2 = SUM(CAST(is_unique AS INT)) OVER --
/*  */ ()
       ,*
FROM    sys.indexes

Currently using SqlPrompt 6.0.0.71 EAP, but same issue in v5.x

Comments

  • This would be considered a formatting feature request.
    You can direct feature requests to our uservoice forums.
    http://redgate.uservoice.com/forums/944 ... uggestions
    These forums are actively monitored by our development team and allow our users to request features and vote on them.
    If a feature receives a significant amount of votes or is deemed to have merit development may include the feature in a future release.
    Manfred Castro
    Product Support
    Red Gate Software
Sign In or Register to comment.