JOIN Layout Suggestion
pburleson
Posts: 12
We've been looking at using SQL Prompt 3 to apply a consistent layout to our SQL Code and after working with our team, we have a suggestion. Within the Data Statements, for JOINS, allow having the ( on the next line not be indented. Also, we'd like to have the ON on the line with the join and the start of the clauses on the next like.
For example, here's how SQL Prompt would do it now:
SELECT
staffId,
staffName,
a
FROM
personnel
INNER JOIN (
SELECT
a
FROM
b
) AS ab
ON personnel.a = ab.a
Here's what we'd like:
SELECT
staffId,
staffName,
a
FROM
personnel
INNER JOIN
(
SELECT
a
FROM
b
) AS ab ON
personnel.a = ab.a
The ON with the new line is less important than having the sub query not indent an extra time.
Thanks,
Patrick
For example, here's how SQL Prompt would do it now:
SELECT
staffId,
staffName,
a
FROM
personnel
INNER JOIN (
SELECT
a
FROM
b
) AS ab
ON personnel.a = ab.a
Here's what we'd like:
SELECT
staffId,
staffName,
a
FROM
personnel
INNER JOIN
(
SELECT
a
FROM
b
) AS ab ON
personnel.a = ab.a
The ON with the new line is less important than having the sub query not indent an extra time.
Thanks,
Patrick
Comments