Tab after comma in stacked list

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
pacha
Posts: 2
Joined: Fri 11 Nov 2016 04:53

Tab after comma in stacked list

Post by pacha » Fri 11 Nov 2016 05:15

Hello!
Can I fulfill formatting requirement of my customer with SQL Complete? Each column in list must be placed on separate line, comma in first position, then 3 spaces, then column specification. Sample:

Code: Select all

select
    pp.ProductID
,   pp.MakeFlag
,   pp.FinishedGoodsFlag
,   columns_updated()
,   nullif(pp.MakeFlag, pp.FinishedGoodsFlag) as 'Null if Equal'
from Production.Product pp
where ProductID < 10
and pp.StandardCost < $100;
go

alexa

Re: Tab after comma in stacked list

Post by alexa » Fri 11 Nov 2016 07:17

This can be setup in the 'Edit Profile' dialog as follows:
1. Select 'SQL Complete -> Options...' from the main menu. The 'Options' window opens.
2. Navigate to the 'Formatting -> Profiles' branch.
3. Select the active profile and click the 'Edit Profile...' button.
4. Navigate to the 'SELECT -> Select List' section.
5. Select the 'Line break before first column' option.
6. Navigate to the 'Stacked List' section.
7. Select the 'Place comma before item in stacked list' option.
8. Navigate to the 'Text Editor Options' section.
9. Specify '2' in the 'Tab size' field.
10. Specify '1' in the 'Indent size' field.

pacha
Posts: 2
Joined: Fri 11 Nov 2016 04:53

Re: Tab after comma in stacked list

Post by pacha » Fri 11 Nov 2016 08:49

Hello, alexa. Thank you for reply. I need to keep tab size = 4 spaces. In column list I need to insert comma in position 1, and column specification in position 4, i.e. insert 3 spaces after comma.

alexa

Re: Tab after comma in stacked list

Post by alexa » Fri 11 Nov 2016 13:32

We have just e-mailed to you with the prepared formatting profile for this.

Post Reply