Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Numeric precision conversion : truncation instead of rounding
morsi wrote:
> I'm working in a project of converting an application from Syabse to
> Oracle (1000 man-day).
> In Sybase, the result of convert(numeric(4,2),1.2378) is 1.23
> In Oracle, the result of cast(1.2378 as number(4,2)) is 1.24
> I look the same thing in implicit conversion : insert number(6,4) value
> in a table column of the type numeric(4,2)
> How to modify the oracle behaviour (any server option ? )to do
> truncation instead of rounding ? Of course I can use truncate function
> but it will complicate all the obvious conversions.
The issue is precision. Oracle is right. Sybase is wrong. (in this group at least - if you want Oracle to be wrong try comp.databases.sybase ;-)
Besides, attempting to insert a number(6,4) into a number(4,2) column.. well that sounds like.. looking for trouble... head up arse.. stupid.. a lead pipable offense.. to mention just a few of the terms that jumps to mind.
And if that is how Sybase was treated over there.. a 1000 mandays conversion to Oracle ain't gonna solve -any- of the problems over there.
-- BillyReceived on Wed Oct 26 2005 - 00:22:51 CDT
![]() |
![]() |