Indenting more than the default indent size for specific cases(SQL Complete in SSMS)

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
pea
Posts: 1
Joined: Fri 18 Oct 2019 07:27

Indenting more than the default indent size for specific cases(SQL Complete in SSMS)

Post by pea » Fri 18 Oct 2019 07:46

This question is about SQL Complete, and its automatic formatting in SSMS.

At work I need to follow formatting already used everywhere, and one of the things I can't seem to find out how to do is to increase indenting for some cases.
Like in this case here(This is what I've managed to do):

Code: Select all

SELECT
	A.Person AS P
FROM T1 AS A
WHERE 1 = 1
	AND NOT EXISTS (SELECT *
		FROM T2 AS C
		WHERE C.A = A.B)
but the standard at work is like this:

Code: Select all

SELECT
	A.Person AS P
FROM T1 AS A
WHERE 1 = 1
	AND NOT EXISTS (SELECT *
				FROM T2 AS C
				WHERE C.A = A.B)
So the indenting starts from the location of the new line on the previous line basically.
The easiest way I can see doing something like this, would be to adjust how many indents you use for where/from clauses of subqueries. or something like that, but the more user friendly might be to have it as a check box(Start indenting from newline(Maybe based on closest amount of tabs matching the length), or something along those lines)?

not sure if this is something that's possible to do with the tool currently, or if it's something I could request(Or if it's already a request; tried searching around first)?

-- Edit: typo, and some nicer grammar here and there
-- Edit 2: forgot to add which tool I'm speaking of..
-- Edit 3: changed some naming in the sql, but the structure is what matters in this case

alexa
Devart Team
Posts: 2858
Joined: Fri 24 Jun 2011 14:17

Re: Indenting more than the default indent size for specific cases(SQL Complete in SSMS)

Post by alexa » Fri 18 Oct 2019 10:04

You could try the following settings:
Image

Post Reply