Comments
1 comment
-
ColinBlair wrote:I would like some new options on an advanced join layout.
...
Hi,
many thanks for the option suggestions. We have now entered a code freeze period with SQL Refactor, and I hope to have RC1 ready today. This means that the above suggestions will have to wait until future releases. However I have saved them so we will consider them when the time for new feature selection comes.
A workaround until then could be to use parentheses around the join statements. These we will nest and indent according to their depths.
Kind regards,
Andras
Add comment
Please sign in to leave a comment.
First, within the existing structure a space needs to be added after any On or OR. This will match them with the three letter AND statements and line things up better.
Second, I would like the option to have the table names on seperate lines from the join command and then indented.
----Table1
INNER JOIN
----Table2
Third, I would like nested joins to be further indented. It would look like this:
____Table1
LEFT OUTER JOIN
________Table2
____INNER JOIN
________Table3
____ON__Statement
____AND_Statement
ON__Statement
I find that this layout is essential to fully understanding complex queries with multiple levels of joining.
Right now it looks like this:
____A
LEFT OUTER JOIN B
INNER JOIN C
____ON C.I = B.I
_______AND C.F = 1
____ON A.I2 = B.I2
Which can be hard to read. The reader needs to understand that A is outer joined to the result of the join of B and C. The statement LEFT OUTER JOIN B gives the reader a wrong impression since the join is to the result of B INNER JOIN C, not to B.[/i]