Viewing 15 posts - 4,066 through 4,080 (of 6,036 total)
Whole bunch of examples where FLOAT (DOUBLE PRECISION) fails is in 1st topic.
Regarding second one:
DECLARE
@enumerator DECIMAL(38, 12)
,@denominator DECIMAL(38, 12)
SELECT
@enumerator = 50
,@denominator = 111.111
SELECT @enumerator/@denominator,
...
_____________
Code for TallyGenerator
June 12, 2007 at 3:50 pm
JacekO, did you notice my post clarifiyng what was wrong with initial version of the function?
Post after which everything became clear?
Yes, I fixed the function, but I cannot fix...
_____________
Code for TallyGenerator
June 12, 2007 at 3:27 pm
David, nobody can stop you from wasting your time on implementation.
Just take this for testing:
DECLARE
@enumerator DECIMAL(35, 25)
,@denominator DECIMAL(35, 25)
SELECT
@enumerator = 5
,@denominator = 111.111
SELECT @enumerator/@denominator,
dbo.fn_BRound(@enumerator/@denominator,...
_____________
Code for TallyGenerator
June 12, 2007 at 3:11 pm
David,
the only person who demonstrates stupidity is you (not only, actually, but not me
).
I passed to BR 2 representations of the same value...
_____________
Code for TallyGenerator
June 12, 2007 at 2:58 pm
According to the definition of table #tmp it's
table_name, column_name, num_records
where you've got value '20202'.
_____________
Code for TallyGenerator
June 12, 2007 at 7:44 am
BTW, I'm thrilled to see the implementation of BR which will round 100000000.01/800000000.01 correctly.
_____________
Code for TallyGenerator
June 12, 2007 at 7:36 am
Where?
I saw truncated value .66666666, not 2/3.
Can you pass 2/3 = 0.(6) into that function?
_____________
Code for TallyGenerator
June 12, 2007 at 7:22 am
Just open tables sysobjects and syscolumns and change the names in the query correspondingly.
id, xtype, etc.
_____________
Code for TallyGenerator
June 12, 2007 at 7:13 am
June 12, 2007 at 6:55 am
David, BR does not take into account next digits.
It assumes that all digits following those you can see (depending on precision you've got) are zeros.
Which is an impossible event.
That's...
_____________
Code for TallyGenerator
June 12, 2007 at 6:45 am
DECLARE
@enumerator decimal(23,15)
,@denominator decimal(23,15)
SELECT
@enumerator = 2
,@denominator = 3
SELECT @enumerator/@denominator,
dbo.fn_BRound(@enumerator/@denominator, 100)
,Round(@enumerator/@denominator,2)
---------------------------------------- --------------------- ----------------------------------------
.666666666666666 ...
_____________
Code for TallyGenerator
June 12, 2007 at 6:35 am
sys.objects and sys.columns are from system catalog in SQL2005.
For SQL2000 use sysobjects and syscolumns.
_____________
Code for TallyGenerator
June 12, 2007 at 6:24 am
I don't think you read that post attentively enough.
That script searches for a value in all columns of all user tables.
_____________
Code for TallyGenerator
June 12, 2007 at 6:04 am
Is it what you are after?
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=345205
_____________
Code for TallyGenerator
June 12, 2007 at 5:48 am
> The stored procedure is there and public has execute permission.
The stored procedure is where?
There is a sp "sp_helpUser" in master database. And SQL Server will always try to execute...
_____________
Code for TallyGenerator
June 12, 2007 at 5:30 am
Viewing 15 posts - 4,066 through 4,080 (of 6,036 total)