Viewing 15 posts - 196 through 210 (of 294 total)
He also said:
Cyberspace is - or can be - a good, friendly and egalitarian place to meet.
- Douglas Adams
and
Don't believe anything you read...
June 9, 2007 at 11:28 am
Infinity! From "why does this algorithm return inconsistant results?" to Infinity. And beyond!
It is known that there is an infinite number of worlds, simply because there is an...
June 9, 2007 at 11:02 am
As one of the 5 still reading this thread, (I feel a duty to, ) or is it now less, here are my results from...
June 6, 2007 at 11:59 am
Ever wish you had not posted something? (Of course you have).
People, enough already.
Lynn, in his last post said
"This started as a topic on a Bankers Rounding function"
Actually, (and I'm sorry...
June 3, 2007 at 5:56 pm
The corrected Function
-- =============================================
-- Create scalar function (FN)
-- =============================================
IF EXISTS (SELECT *
FROM SYSOBJECTS
WHERE NAME = N'fn_BRound')
DROP FUNCTION fn_BRound
GO
CREATE FUNCTION fn_BRound
(@p1 DECIMAL(30,20),
@p2 INT)
RETURNS MONEY
/*
Round-to-even method (from http://en.wikipedia.org/wiki/Rounding)
This...
June 1, 2007 at 8:10 am
P.S That's two pints I owe you. As well as Lynn, Antares686, Sergiy and the other who have contributed.
Dave J
June 1, 2007 at 8:01 am
Thanks Jeff, it does. And credit to Sergiy and Lynn for spotting it. For the record I did not want to start a "Holy War", we've got enough of those as...
June 1, 2007 at 7:59 am
Oops, I thought your previous post was to me. Having said that, can you tell me what is wrong with
Floor(Abs(@Temp + 0.5 * Sign(@p1)))
Preferably in non-math language
June 1, 2007 at 4:41 am
Sergiy, as i said, ignoring the validity of 'bankers rounding', I just wanted to know why the original algorithm worked only sometimes. You wrote
Here is the mistake:
... Floor(Abs(@Temp + 0.5...
June 1, 2007 at 4:20 am
Just walked back into work and i was overwhelmed by the number of responses sat in my mailbox
First of all, many thanks to...
June 1, 2007 at 4:05 am
Wow! - quick response!
Replaced all the float declares with decimal(38,20) but I still get bad results
---------------------
511.9500
---------------------
512.9500
---------------------
578.9500
---------------------
654.9500
--------------------...
May 31, 2007 at 12:18 pm
What a great thread. Thanks to all for contributing to a tremendous read.
Dave J
May 30, 2007 at 7:34 am
As mentioned above, indentation is a wonderful thing. And your code has a misplaced END. Try this
SET ansi_nulls ON
SET quoted_identifier ON
GO
/* *********************************************************************************************************************
******This stored procedure inserts a header according to its ID....
January 25, 2007 at 11:38 am
Another solution for this is at
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=242919#bm243627
Jeff Moden was very generous.
HTH
Dave
December 14, 2006 at 5:04 am
It may be worth pointing out that if your number starts with a Zero (0), as in the UK, it needs to be stored as a varchar. I agree...
December 1, 2006 at 7:51 am
Viewing 15 posts - 196 through 210 (of 294 total)