Menu

#44 SQL Server money precision must be 4

None
closed
nobody
None
5
2018-09-25
2018-09-24
Student
No
  • Unixodbc 2.3.7-1

  • Python: 3.7.0

  • pyodbc: 4.0.24
  • OS: Linux
  • DB: Microsoft SQL Server 2008 R2 (SP3) - 10.50.6220.0 (X64)
  • driver: FreeTDS
db = pyodbc.connect(my_connection_string)
sql = 'SELECT CAST(0.1234 AS money)'
print(db.execute(sql).fetchall()[0]) 

# outputs (Decimal('0.12'), )
# expected (Decimal('0.1234'), )

All MSSQL versions should have 4-digits precision for money type

Trace and helpful guidelines here: https://github.com/mkleehammer/pyodbc/issues/463

Is this configurable maybe? Thank you!

Discussion

  • Nick Gorham

    Nick Gorham - 2018-09-25

    Hi, I think the proiblem is likely to be with the driver (freeTDS I think) not the driver manager, I would ask the freTDS folk about this.

     
  • Nick Gorham

    Nick Gorham - 2018-09-25
    • status: open --> closed
    • Group: -->
     
  • Nick Gorham

    Nick Gorham - 2018-09-25

    Not a unixODBC issue (I believe)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.