How can we help you today? How can we help you today?

Bug in MONEY rule replacement

Start with this code:

CREATE TABLE blah
(
id MONEY
)

When the rule checker highlights MONEY as a problem, click the lightbulb then "Use DECIMAL datatype instead".

SQL Prompt kindly returns this code:

CREDECIMAL(19, 4)ABLE blah
(
id MONEY
)

Oops!
tgburgin
0

Comments

7 comments

  • MichelD
    Same with :
    DECLARE @Batch_ID SMALLINT,
             @TotalBalance MONEY

    Becomes:
      DECLARE @Batch_ID SMALLDECIMAL(19, 4)
             @TotalBalance MONEY

    SQL Prompt 9.4.7.7595
    MichelD
    0
  • tgburgin
    Ah ha, it's just doing the replace on the line above.
    If you test:
    DECLARE @Batch_ID SMALLINT, @Test BIGINT,
            @TotalBalance MONEY

    It goes to:
    DECLARE @Batch_ID SMALDECIMAL(19, 4) @Test BIGINT,
            @TotalBalance MONEY

    Replacing the characters directly above the MONEY declaration.
    tgburgin
    0
  • Alex B
    Hi @tgburgin and @MichelD,

    This issue originally appeared as SP-7377 where it broke for
    DECLARE @m MONEY;<br>--into<br><span>DECDECIMAL(19, 4)@m MONEY;</span>
    That has been corrected but it has either caused this issue or this issue went unnoticed and uncorrected.  I have reopened SP-7377 and referenced the information here and will update you when I have more info!

    Kind regards,
    Alex
    Alex B
    0
  • Alex B
    Hi all,

    Just an update, the team have let me know they've fixed it for the other cases and it should be available in the next release, I'll post here again when that is available!

    Kind regards,
    Alex
    Alex B
    0
  • tgburgin
    Great news, thanks @Alex B
    tgburgin
    0
  • Alex B
    Hi all,

    It's out now, in 9.4.9 !  Do please confirm that it corrects the issue for you!

    Kind regards,
    Alex
    Alex B
    0
  • tgburgin
    @Alex B confirmed as fixed in 9.4.9, thank you!
    tgburgin
    0

Add comment

Please sign in to leave a comment.