A bug in Sybase's query parser/ numeric conversion code
- From: "joeNOSPAM@xxxxxxx" <joe.weinstein@xxxxxxxxx>
- Date: 12 Jul 2006 10:30:34 -0700
Hi all. This issue was also raised in a previous post about a convert
oddity:
select convert(numeric(16,2), 5.3299),convert(numeric(16,2), '5.329')
returns
5.32 5.33
The problem is in the truncation/round-down of the first conversion,
compared
to the round-up of the second value that is actually lower. It's
definitely a DBMS
issue and not a client one, because if you select:
select convert(varchar(30), convert(numeric(16,2), 5.3299))
you still get 5.32
if you change the values to 5.999, you get
5.99 and 6.00
Joe Weinstein at BEA Systems
.
- Prev by Date: Wrong select Plan
- Next by Date: Re: Sybase convert oddity
- Previous by thread: Wrong select Plan
- Next by thread: Query to find amissing number
- Index(es):