Competition: What’s your favorite Redgate tool? Enter now.

Could you help to confirm if this is a formatting bug?

ogrishmanogrishman Posts: 78 Bronze 4
edited January 11, 2017 9:58AM in SQL Prompt
I have a piece of code:
DECLARE @orders TABLE(order_id BIGINT NOT NULL UNIQUE WITH(IGNORE_DUP_KEY=ON))

When I format it, it changed to:
DECLARE @orders TABLE (   order_idBIGINTNOTNULL
                              UNIQUE
                              WITH (IGNORE_DUP_KEY = ON)
                      );

Note the order_id and its type connected together. Can anyone help me to confirm please? I'm using the most recent version of SSMS and SQL Prompt.
Tagged:

Comments

  • Hi ogrishman,

    Thanks for posting on the Redgate forums.

    Can you check if you have the 'Use new formatting styles' option selected? You can check this via SQL Prompt>Options>Experimental Features then the bottom tickbox is 'Use new formatting styles'.

    If you have this turned on can you turn it off and test again?
    Kind regards,
    Dan Bainbridge
    Product Support Engineer | Redgate Software
  • ogrishmanogrishman Posts: 78 Bronze 4
    Yes it was checked. When I disable the new formatting, I can format the code correctly and it was formatted to:
    DECLARE @orders TABLE
        (
          order_id BIGINT NOT NULL
                          UNIQUE WITH ( IGNORE_DUP_KEY = ON )
        );
    

    When I switch back to new formatting, it still format the code as I mentioned before.
  • Hi ogrishman

    Thanks for reporting the issue. Yes, this is a bug in the new formatting feature. We've reproduced it here and can start working on a fix.

    Many thanks
    Harry
  • Hi ogrishman,

    Thanks for your patience with this. We have fixed this bug in SQL Prompt version 8 which can be downloaded from here

    ftp://support.red-gate.com/patches/SQLPrompt/24May2017/
    Kind regards,
    Dan Bainbridge
    Product Support Engineer | Redgate Software
Sign In or Register to comment.