What are the challenges you face when working across database platforms? Take the survey
Options

Insert empty line between join clauses

edited September 4, 2017 9:19AM in SQL Prompt
Hi Redgate Team,

The following statement will cause a formatting issue:

SELECT 1
FROM
sys.dm_exec_requests AS r
INNER JOIN
sys.dm_exec_sessions AS se
ON
r.session_id = se.session_id
FULL OUTER JOIN
sys.dm_exec_connections AS con
ON
con.session_id = se.session_id
OUTER APPLY sys.dm_exec_query_plan(plan_handle) AS p
OUTER APPLY sys.dm_exec_sql_text(r.plan_handle) AS t
GO

If you enable JOIN / Insert empty line between join clauses SQL Prompt will just add a new line before the FULL OUTER JOIN. I expected to see a new line for every join clause.
I guess this needs to be fixed...

Thanks!

Torsten

Comments

  • Options
    Hi @torsten.strauss,

    Thank you for reporting, but we don't think it is a bug. This option does what it says, it adds new line between JOIN clauses, not before each JOIN. It is well presented on default preview in Prompt.

    Best regards,
    Krzysztof Kroczak
Sign In or Register to comment.