freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: money4 to char
- Date: 15 Aug 2002 09:08:21 +0200
Il gio, 2002-08-15 alle 08:53, James K.Lowden ha scritto:
> On 15 Aug 2002 08:16:44 +0200, "Frediano Ziglio" <freddyz77 AT tin.it> wrote:
>
> > Yesterday I did some test with tsql. Returning smallmoney (SYBMONEY4)
> > print only 2 decimal digits but money4 have a precision of 4 decimal
> > digits. It this intentional?
> >
> > 1> select convert(smallmoney,'123.3456')
> > 2> go
> >
> > 123.34
>
> It should display two digits, but rounded, not truncated. tsql's display
> choice isn't very important (it's meant for testing, not query writing),
> but does sqsh do that?
I don't know sqsh but ms query analyzer return all 4 digits (rounded).
Our library convert to char (the result of tsql came directly from
tds_convert) with 2 digit, truncated.
IMHO max precision is the good choice.
> Here's Sybase:
>
> 1> select convert(smallmoney,'123.3456')
> 2> go
>
> ------------------------
> 123.35
>
> (1 row affected)
>
freddy77
-
money4 to char,
Frediano Ziglio, 08/15/2002
- <Possible follow-up(s)>
- Re: money4 to char, James K . Lowden, 08/15/2002
- Re: money4 to char, Frediano Ziglio, 08/15/2002
Archive powered by MHonArc 2.6.24.