Skip to content

[BUG] update decimal type field. the original value round up #942

@seektuzi

Description

@seektuzi

Driver version

mssql-jdbc-6.4.0.jre8.jar

SQL Server version

mssql 2016

Client Operating System

redhat 7.0

JAVA/JVM version

java version "1.8.0",

Table schema

default(dbo | public)

Problem description

i have one script to update some decimal columns.
the script is like below:
Update MyTable set r1_total=r1_total+'8.68000' ,r2_total=r2_total+'0' , ... where key = MyKey
both r1_total,r2_total are decimal(31,5).
once i this script was executed. the r2_total was changed from 7.68000 to 8.00000.

  1. Expected behaviour:
    if add '0'. the value shouldn't be changed.
  2. Actual behaviour:
    after add '0'. the original value round up
  3. Error message/stack trace:
    Null
  4. Any other details that can be helpful:
    Null

JDBC trace logs

Null

Reproduction code

Null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions