Indents on Formatting code inconsistent

MartinBMartinB Posts: 6
edited September 17, 2009 8:57AM in SQL Refactor Previous Versions
Hi when you format code with a sub select the indentation is inconsistent.
I have my indentation set to 4 spaces which when I format most code is OK
But
When I have a sub select in the code it indents the sub select code with only 2 spaces (The formatting below has been done by this page but you get the idea - the indents under the first From are 2 but the indents under the FROM in the sub select is 1 )
If I set my indent to be 4 I expect it to be 4 throughout ALL the code

SELECT
    *
FROM
    Member m
WHERE
    memberid IN ( SELECT TOP 100
                    memberid
                  FROM
                    member where membername like '%smith')

Comments

  • Many thanks for your post Martin.

    Can you kindly let us know the expected formatting out put of the query?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: [email protected]
  • Many thanks for your post Martin.

    Can you kindly let us know the expected formatting out put of the query?
    Hi

    I have my indentation set to 4 spaces So for a SELECTstatement I
    expect the the begining letter of the column name to allign under the second e of SELECT i.e 4 chars in
    Normally this happens OK
    but if the select statement is offset to the right on the page as when you are doing a sub select it aligns the field colums under the L of the SELECT.
    Hope this makes sense.
    I cant display an example here because the rendering of this page appears to have its own formatting rules.
    If you want I can email examples.
  • As per our email communication.

    I wrote: "Thanks for your prompt reply.

    Yes you are right it is inconsistent hence I have logged this as a bug in our internal tracking system SR-855.

    So that it can be reviewed by our development team and considered as candidate in our future release.

    Thanks for your prompt reply and your feedback it is highly appreciated."
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: [email protected]
Sign In or Register to comment.