[AccessD] Rounding in SQL Server ODBC

Gustav Brock Gustav at cactus.dk
Tue May 2 09:46:20 CDT 2006


Hi Lambert

Historical reasons? Back to the common Sybase code base?
I have no idea but that rounding method is truly weird.

/gustav

>>> Lambert.Heenan at AIG.com 02-05-2006 15:49:16 >>>
Looks like a neater solution, but I'm highly curious as to why SQL server
has this bizarre form of rounding in the first place!

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Tuesday, May 02, 2006 6:52 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Rounding in SQL Server ODBC


On 2 May 2006 at 9:42, Gustav Brock wrote:

> Hi Scott
> 
> Well, it could be, and I considered some IIf() constructs too, but 
> they got too long-winded.

How about:
(ID \ 10) * 10 + Choose(ID Mod 10 + 1, 0, 0, 3, 3, 3, 7, 7, 7, 7,10)

-- 
Stuart




More information about the AccessD mailing list