Page 1 of 1

Tab after comma in stacked list

Posted: Fri 11 Nov 2016 05:15
by pacha
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

Re: Tab after comma in stacked list

Posted: Fri 11 Nov 2016 07:17
by alexa
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.

Re: Tab after comma in stacked list

Posted: Fri 11 Nov 2016 08:49
by pacha
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.

Re: Tab after comma in stacked list

Posted: Fri 11 Nov 2016 13:32
by alexa
We have just e-mailed to you with the prepared formatting profile for this.