Comments
3 comments
-
the same would be true for indenting the content of the schema:CREATE TABLE Production.BillOfMaterials (BillOfMaterialsID INT IDENTITY(1, 1) NOT NULL PRIMARY KEY NONCLUSTERED(BillOfMaterialsID ASC),ProductAssemblyID INT NULL,ComponentID INT NOT NULL,UnitMeasureCode NCHAR(3) NOT NULL FOREIGN KEY REFERENCES UnitMeasures(ID, Code)) ON [PRIMARY]GRANT EXECUTE ON LogEvent TO ts_webapplication;ALTER AUTHORIZATIONON OBJECT::Production.ProductionView006TO SCHEMA OWNER;
-
Also the CTE statement formatting: Put the parenthesis inline with the first statement, closing paren on a new line but indent the contents from the left edge
-
Hi @shawndevin
Thanks for reaching out to us regarding this.
Regarding the first example, I think I've been able to achieve what you are after with the example statement you provided.
Under Parentheses, I selected the 5th style (the last style on the top line) and checked 'Indent parentheses contents'. Also, just to mention, I had to ensure 'Place DISTINCT/TOP clause on new line (under Data (DML) was unchecked to stop 'name' going onto a new line. Having these formatting settings in place made the example statement look as required.
Regarding indenting the content of the schema and the CTE statement formatting, I've not been able to find a way to do either of these so far.
I wondered, would it be possible for you to provide you style file? That way I can use it to further test this.
Add comment
Please sign in to leave a comment.
I use sub queries fairly often and I always indent the text of the sub-query like this and its the one option you don't allow though it seems extremely obvious