Re: [racket] Losing decimal in SQL Server query result

2012-11-02 Thread Ryan Culpepper
I've seen in this database. Let me know if there is anything else I do to help you with your testing. -Greg -Original Message- From: Ryan Culpepper [mailto:r...@cs.utah.edu] Sent: Wednesday, October 31, 2012 9:05 PM To: Greg Graham Cc: users@racket-lang.org Subject: Re: [racket] Losing

Re: [racket] Losing decimal in SQL Server query result

2012-11-01 Thread Galler
> > Another possible workaround for now would be to cast the field to a > varchar and call string->number on the result. > numeric is an exact datatype in SQL Server; you'd also want to compose inexact->exact with string->number to preserve exactness (if that's a concern) i.e (inexact->exact

Re: [racket] Losing decimal in SQL Server query result

2012-11-01 Thread Greg Graham
se I do to help you with your testing. -Greg -Original Message- From: Ryan Culpepper [mailto:r...@cs.utah.edu] Sent: Wednesday, October 31, 2012 9:05 PM To: Greg Graham Cc: users@racket-lang.org Subject: Re: [racket] Losing decimal in SQL Server query result ODBC claims to only support

Re: [racket] Losing decimal in SQL Server query result

2012-10-31 Thread Ryan Culpepper
ODBC claims to only support precisions up to 15, so maybe it's overreacting to the unsupported precision by truncating the number to an integer. Can you try casting the field to a lower-precision numeric and let me know what happens? For example, select cast(creditawarded as numeric(10,4))

[racket] Losing decimal in SQL Server query result

2012-10-31 Thread Greg Graham
Hello everyone, I attempting to use the Racket db interface to access a Microsoft SQL Server 2005 database. The field "creditaward" is defined as numeric(19,7), and in the case of the following query, I should get a value of 1.25 rather than 1. Anyone have an idea how I get to the fractional pa