subqueries - start on new line
I'd like an option under data statements --> Subqueries to be able to drop sub-queries starting on a new line like in section Schema Statements --> New lines.
Example:
SELECT
[pgp].[patientid]
FROM
[dbo].[PTGEPATIENT] AS pgp
WHERE
[PATIENTID] NOT IN (SELECT
patientid
FROM
[dbo].[PTAPALCOHOL] AS paa)
would become
SELECT
[pgp].[patientid]
FROM
[dbo].[PTGEPATIENT] AS pgp
WHERE
[PATIENTID] NOT IN (
SELECT
patientid
FROM
[dbo].[PTAPALCOHOL] AS paa
)
We’ve released a new formatting engine in SQLPrompt Version 8.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If there is something missing please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
hfxDBA commented
formatting is off in this example
SELECT
....[pgp].[patientid]
FROM
[dbo].[PT_GE_PATIENT] AS pgp
WHERE
....[PATIENTID] NOT IN (SELECT
...........................................[patientid]
......................................FROM
...........................................[dbo].[PT_AP_ALCOHOL] AS [paa])would become
SELECT
....[pgp].[patientid]
FROM
....[dbo].[PT_GE_PATIENT] AS [pgp]
WHERE
....[PATIENTID] NOT IN (
........SELECT
............[patientid]
........FROM
............[dbo].[PT_AP_ALCOHOL] AS [paa]
........)