• I'm to the formatting part of the Redgate Manual.

    EG. 'we need to decide what comprises a change in the nesting level that things get difficult'

    So, thanks Luis and xsevensinzx.... for the examples on indenting queries and subqueries. It's exactly the kind of help I was asking for.

    And for anyone else who may read this whole thread, here are some additional concrete helpful ideas for formatting READABLE CODE, taken from the Redgate Manual co-authored and suggested as a read by Grant Fritchey.

    • Keep your database case-insensitive, even if your data has to be case-sensitive, unless

    you are developing in a language for which this is inappropriate.

    • Capitalize all the Scalars and Schema object names (e.g. Invoice, Basket, Customer,

    CustomerBase, Ledger).

    • Uppercase all reserved words (such as SELECT, WITH, PIVOT, FROM, WHERE), including

    functions and data types.

    • Put a line-break between list items only when each list item averages more than thirty

    or so characters.

    • Put block delimiters (such as BEGIN and END) on a new line by themselves, correctly

    indented.

    • Put line breaks within SQL statements before the clause (FROM, ON, WHERE, HAVING,

    GROUP BY) only where it aids clarity in long statements, but not in every case.

    • Use the semicolon to aid the reading of code, even where SQL syntax states that it is

    only optional.

    • Use an increased indent for subordinate clauses if the ON, INTO, and HAVING

    Oh, and I can't wait to have that sit down with my team where we have THE TALK about formatting.:hehe:

    --Quote me