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

Formatting of OVER PARTITION and comma alignment

SQL Format has formatted my OVER PARTITION code like this:
<div>COUNT(P.PRPR_ID) OVER (PARTITION BY P.NWNW_ID
                                   ,P.PRCF_MCTR_SPEC
                                   ,P.PRCP_ID
                                   ,P.PRCP_FIRST_NAME
                                   ,P.PRCP_MID_INIT
                                   ,P.PRCP_LAST_NAME
                                   ,P.PRCP_NPI
                                   ,P.PRCP_TITLE
                                   ,P.NWPR_EFF_DT
                           ORDER BY P.NWNW_ID
                                   ,P.PRCF_MCTR_SPEC
                                   ,P.PRCP_ID
                                   ,P.PRCP_FIRST_NAME
                                   ,P.PRCP_MID_INIT
                                   ,P.PRCP_LAST_NAME
                                   ,P.PRCP_NPI
                                   ,P.PRCP_TITLE
                                   ,P.NWPR_EFF_DT) AS [PRPR_CNT]

</div>
It lined up all of the commas.  That's nice, but I would like to turn this off and have all of the fields on one line, like this:

<div>
COUNT(P.PRPR_ID) OVER (PARTITION BY P.NWNW_ID,P.PRCF_MCTR_SPEC,P.PRCP_ID,P.PRCP_FIRST_NAME,P.PRCP_MID_INIT,P.PRCP_LAST_NAME,P.PRCP_NPI,P.PRCP_TITLE,P.NWPR_EFF_DT</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ORDER BY P.NWNW_ID,P.PRCF_MCTR_SPEC,P.PRCP_ID,P.PRCP_FIRST_NAME,P.PRCP_MID_INIT,P.PRCP_LAST_NAME,P.PRCP_NPI,P.PRCP_TITLE,P.NWPR_EFF_DT) AS [PRPR_CNT]

</div>

I realize that can make a really long line, but I'm ok with that.  Is there any setting I can change to format this as I'd like?  BUT, I don't want that to affect lining up the commas for SELECT or INSERT statements, I like how it does that.  

Oh, and I have the same issue with EXECUTE statements, I don't want each parameter to be on a separate line.

Thanks!
RichUchytil
0

Comments

2 comments

  • JoshH
    Hi, 

    Unfortunately there isn't a way to make the customization that granular. I would suggest visiting our SQL Prompt UserVoice site and putting that in as a feature request you'd like to see. Our project managers keep an eye on the suggestions there for new features to add to our products.
    JoshH
    0
  • RichUchytil
    Thanks, I'll do that.
    RichUchytil
    0

Add comment

Please sign in to leave a comment.