Improve tab & parenthesis placement of subqueries ...wherever placed in query
Would like improve tab & parenthesis placement of subqueries ...wherever placed in query ...be it in JOIN, WHERE, HAVING ...or even in SELECT ...ALSO would like option for 1st tabbed item in SELECT list to be the starting position on each row for each subsequent item which includess the placement of the 'prefixed' comma ...see below...
BEFORE (Current formatting)...
LEFT OUTER JOIN (
SELECT
f1
, f2
, f3
FROM
dbo.t1
WHERE
f9 = 'x'
) AS e
ON e.f1 = b.f1
AND e.f2 = b.f2
AFTER...
LEFT OUTER JOIN
(
SELECT
f1
, f2
, f3
FROM
dbo.t1
WHERE
f9 = 'x'
)
AS e
ON e.f1 = b.f1
AND e.f2 = b.f2
This feature was released in version 8.1 of SQL Prompt as part of our rework of parentheses formatting.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team
-
Anonymous commented
Its been 3 years already.... please add this Redgate!
-
Kevin commented
This is such an extremely good feature idea that I consider it outright LUDICROUS that it's not already there.
-
JL commented
spaces were stripped out of sample ---using '~' as placeholder
--REQUESTED--
LEFT OUTER JOIN
(
~~~~SELECT
~~~~~~~~f1
~~~~~~~~, f2
~~~~~~~~, f3
~~~~FROM
~~~~~~~~dbo.t1
~~~~WHERE
~~~~~~~~f9 = 'x'
)
AS e
~~~~ON e.f1 = b.f1
~~~~AND e.f2 = b.f2 -
JL commented
spaces were stripped out of sample ---using '~' as placeholder
--CURRENT--
LEFT OUTER JOIN (
~~~~~~~~~~~~~~~~~SELECT
~~~~~~~~~~~~~~~~~~~~~f1
~~~~~~~~~~~~~~~~~~~~, f2
~~~~~~~~~~~~~~~~~~~~, f3
~~~~~~~~~~~~~~~~~FROM
~~~~~~~~~~~~~~~~~~~~~dbo.t1
~~~~~~~~~~~~~~~~~WHERE
~~~~~~~~~~~~~~~~~~~~~f9 = 'x'
~~~~~~~~~~~~~~~~~) AS e
~~~~ON e.f1 = b.f1
~~~~~~AND e.f2 = b.f2