-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difference between mssql result and actual query result #638
Comments
Sorry you're having trouble with this. It seems to be an issue relating to Tedious, the driver that this library ultimately relies upon. Here is an issue that's in progress that should address the problem: tediousjs/tedious#678 |
@willmorgan i figured, at this moment I am converting the values to string. not a good experience. |
@Rohithzr I'm trying to look into this a little, but your "Create Table Statement" doesn't work, in particular the
|
OK, I've made some adjustments and managed to get it executing locally. The query you give doesn't match the inserted row you provided so I had to modify that too. When run against SQL Server directly I get output When run through mssql library I get: { recordsets: [ [ [Object] ] ],
recordset: [ { rate: 492560 } ],
output: {},
rowsAffected: [ 1 ] } Which means I cannot replicate this problem. Please can you provide a working set up that replicates the error? I tested against mssql 4.2.2, perhaps you need to upgrade the library? |
ill try and and see if the issue still replicates, ill try with current version and if available the upgraded version. |
@dhensby well, i tried replicating this issue and I failed even with the then used [email protected] so probably was something very specific that caused the issue for me. I am closing this issue for now and hope it doesn't pop up, if it does i'll reopen the issue. Thanks to you all for looking into it. |
No problem, thanks for taking another look :) |
In reference to issue knex/knex#2557
Environment
Mssql version: 4.1.0
Database + version: MSSQL 2016
OS: Ubuntu
As per the query below, the reulting values in the
buy
andsell
column should be490560
and515620
respectively. But the result I get isbuy: 490559.99999999994, sell: 515619.99999999994
.The
rate
column is of typeDeimal 38,19
hence a value larger than 32 bit is possible, but this particular value is well within 32 bits and should work simply.Create Table Statement
Data
following is a small snippet of code I used to test this
The text was updated successfully, but these errors were encountered: