Skip to content

Some decimal numbers are read from the database with extra decimal numbers #793

Closed
@pablopen

Description

@pablopen

Some decimal numbers are retrieved from the database with extra decimals.

If we define a column as Number(18,6), and insert this values:

235.772
235.944
236.644

and then we query the database, we get the following values:

235.77200000000002
235.94400000000002
236.644

Seems that oracledb is messing with the decimal parts of some numbers, when parsing then into a javascript number (the integer part looks irrelevant, 20.772 is also affected by the same issue)

Setup:

  1. What is your version of Node.js? v4.6.2

  2. What version of node-oracledb are you using? 1.13.1

  3. What is the version of your Oracle client (e.g. Instant Client)? 12.2.0.1.0

  4. What is the version of Oracle Database? Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

  5. What is your OS and version? ubuntu 16.04 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions