Line Return Indentation Issue

michaelfriedmichaelfried Posts: 25
edited September 9, 2009 11:20AM in SQL Prompt Previous Versions
As I am typing in a query, I have not figured out how to get the new line indentation to start at the level of indentation of the previous line in SQL Prompt 4.

For Example:
SELECT a.[Column1],
            a.[Column2],
a.[Column3]

Each new line starts all the way to the left, instead of indented at the level above (SQL Prompt 3.9 worked this way --> a.[Column3] would be indented the same as a.[Column2] automatically). What settings do I change in the format area to make it work properly?

Do I have to manually choose Format SQL after I am done typing in my query everytime? That seems like extra unnecessary work (especially since the previous version did not make you do that).

Mike

Comments

  • I'm experiencing the same thing. It also occurs when writing conditional statements, such as:

    IF @strName IS NULL
    BEGIN
    SET @strName = 'Bob' -- This would have been indented in SQL Prompt 3
    END

    This is quite annoying after not having to deal with indentation for so long, SQL Prompt 3 did a great job of handling this.
  • Anu DAnu D Posts: 876 Silver 3
    edited August 18, 2009 10:54AM
    Hello Mike,

    Thanks for your post Mike and apologies for the inconvenience.

    I am tryng to replicate your issue but not able to.

    Could you kindly send us your complete query on support@red-gate.com and I will create a call reference for you and we can carry from there?

    Kindly let me know your view on this.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Anu DAnu D Posts: 876 Silver 3
    Hello bmsullivan

    Thanks for your post.

    Could you kindly send us the option setting which you did for SQL Prompt 3?

    And also if you could let us know which way you want SQL Prompt 4 to format the above query given by you?

    Above details will help us to replicate the issue and investigate further.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Sent an email to RedGate Support as requested.

    Mike
  • Anu DAnu D Posts: 876 Silver 3
    Thanks for your email.

    I have replied to your email kindly let us know if that fixes the issue.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Hello,

    I'm having the same issue, would you mind sharing the trick?

    Thanks!

    Bas
  • Anu DAnu D Posts: 876 Silver 3
    Hello Bas,

    Many thanks for your post.

    Could you kindly change following settings:
    SQL Prompt 4 --> Options --> Format --> Data Statements --> unselect option <Indent subclauses>

    Let us know if this fixes the issue.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Thanks for your anwser.

    It was already unchecked.
    Tried to check/uncheck it, makes no difference.
  • Anu DAnu D Posts: 876 Silver 3
    Thanks for the update.

    Could you kindly send us screenshots of your settings on support@red-gate.com ?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Anu DAnu D Posts: 876 Silver 3
    Hello Bas,

    If you could include the link to this forum in your email will be of great help.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • I am having the very same issue. I find that now the "format" section under "Options" is greyed out because I am on the "standard" version. I dont remember having any limitations, especially in the options under SQL Prompt 3.0.

    The indentation at various points was extremely intuitive in 3.0, and an enormous help and not having that in 4.0 is almost very disappointing. The speed in 4.0 is fantastic, so great job on that angle !

    Could you please post a public note on how to get the indentation working ?
  • I tried your suggstion and it made no difference. The option was already unchecked. I tried both ways (checked and unchecked) and it still does not indent properly.

    Mike
  • Hello all,

    Guilty as charged :(
    In the process of redesigning the options dialog, we missed retaining the default indentation behaviour for SQL Prompt v4. This is a bug and we will fix it in our next release. Until then, I am afraid we do not have any workaround unless any of you can come up with an ingenious solution :wink:
    Sincere apologies for the inconvenience this has caused.

    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd
  • Hello Tanya,

    Good to know it will be fixed.

    Nice enhancements for the rest! The speed is amazing.
  • MikeyCMikeyC Posts: 249 Bronze 3
    I ended up going into the standard SSMS Tools, Option, Text Editor, All Languages, Tabs and setting the Indenting option to Block so that it kept the indent level at the same level as the previous line.

    At least that helps until you can get the next release out.
  • Tanya,

    Thanks for the acknowledgement. Its not often that a company owns up to a mistake, especially when they have to confess that they do not have a solution ready at hand. Thank you for that. Appreciate it.

    I hope you would put this up as a hotfix asap, rather than a service pack release.

    Another issue that I found was the way it provides suggestions. Consider the below query:

    Select Customer.Name, Orders.OrderDate, Orders.Quantity, Orders.Total
    from Customer INNER JOIN Orders on Customer.CustomerId = Orders.CustomerId
    where Year(OrderDate) = 2009

    In SQL Prompt 3.0, when I try to modify the select list, I used to get intelligent prompting of only the tables that are involved in the query, as soon as I enter a space after "Select" or a comma after an item in the select list. Now I dont seem to get that intelligent prompting, and instead, it seems to prompt on whatever characters I choose, and gives me options of all matching tables in teh database, rather than only the tables involved in the query in question.

    That intelligent prompting, although subtle, was fantastic to work with. Can you look into that as well, please ?
  • tanya wrote:
    Hello all,

    Guilty as charged :(
    In the process of redesigning the options dialog, we missed retaining the default indentation behaviour for SQL Prompt v4. This is a bug and we will fix it in our next release. Until then, I am afraid we do not have any workaround unless any of you can come up with an ingenious solution :wink:
    Sincere apologies for the inconvenience this has caused.

    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd

    I have a quick question.
    If i buy the v4 pro , do i need the additional option support and upgrades package to have the next release (with bug corrected)?
  • Hello,

    Nope. The version on the website has the updated release and so it would all work straight out of the box:)

    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd
  • Thanks for the fast reply. i didn't know because on the website it's still 4.0, so i thought it was the same release as weeks ago.

    And for the next correction of bugs ? do i need additional option support and upgrades package ?
  • With all Red Gate products, minor releases work as free upgrades. So any 4.x release will be available free of cost for all v4.0 users.

    Support and upgrades package will qualify users for free upgrade to any major releases(like say SQL Prompt v5.0) that gets released during your support and upgrades tenure!


    Thanks,
    Tanya
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.