Formatting of OVER PARTITION and comma alignment
RichUchytil
Posts: 6 New member
SQL Format has formatted my OVER PARTITION code like this:
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!
<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> 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!
Tagged:
Best Answer
-
JoshH Posts: 55 Bronze 1Hi,
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.
Answers