Skip to Content.
Sympa Menu

freetds - Re: [freetds] dbconvert SYBMONEY to String

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dbconvert SYBMONEY to String
  • Date: Wed, 13 Oct 2010 23:45:55 -0400

Ken Collins wrote:
> 1> SELECT [id], [money] FROM [datatypes] WHERE [money] IS NOT NULL;
> 2> GO
> id money
> 161 4.20
> 162 -922337203685477.58
> 163 922337203685477.58

The above doesn't show any loss of precision; it shows only that the
client you're using prints MONEY fields as strings with two digits of
precision. That's that client's choice.

select 10000 * sum(money) from datatypes where id in (162,163)

should show -1.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page