Viewing 15 posts - 4,081 through 4,095 (of 6,036 total)
Try to cut the code to calculate duration of some overnight event - started on one day and finished on another.
Compare it with simple DATEDIFF.
And don't put yourself in trouble.
It's...
June 12, 2007 at 4:28 am
> If you'd like to debate the accuracy of the function being used, that would be a wonderful direction to take, as I think everyone would benefit from a version...
June 12, 2007 at 3:56 am
It's not a question of which representation I'd like to use.
Bankers Rounding just cannot process 2/3 at all.
What's a problem for you to show the code where you round 2/3...
June 12, 2007 at 3:01 am
> Banker's rounding doesn't return "false results" any more than any other method of rounding or truncating a number, it returns perfectly predictable results which may or may not fit...
June 12, 2007 at 12:09 am
I asked for code where BR function rounds 2/3.
The only version I've got was rounding 0.66666666.
But you claimed that 0.66666666 is 0.66666666(0) and not anything else.
2/3 = 0.66666666(6), so...
June 12, 2007 at 12:07 am
BTW,
you better don't separate date and time in tables.
It's just wasting space, time for coding and losing performance of queries.
June 12, 2007 at 12:02 am
Actually 109, for example, brings you time portion.
If you don't want to see date in the string just apply some string manipulations to remove unwanted characters.
One of the options:
SELECT STUFF(SUBSTRING(CONVERT(nvarchar(30),...
June 12, 2007 at 12:00 am
So, class failed to provide code for bankers rounding of 2/3 and dismissed itself.
On my post #102 in this topic I can conclude:
Bankers Rounding either
- cannot round most of...
June 11, 2007 at 10:45 pm
I would keep the kitchen table corners.
Just in case: mother-in-law visit or something...
![]()
June 11, 2007 at 7:30 pm
Open BOL on "CAST and CONVERT" and choose one of formats having AM/PM.
108 is not the only one.
June 11, 2007 at 6:29 pm
> Just so you all know, there are definately more than 5 that have been reading this since the beginning.
And some become quite exited about that.
June 11, 2007 at 3:47 pm
elect distinct
Case WHEN I.classid=4 then 'P'
when I.classid=3 then 'R'
when O.jobid=9 then 'U'
end as EmployeeId,
O.empname,
U.classname
from emp O
left outer join Lookup T on O.TypeId = T.TypeId
left outer join Indicator I on I.empid=...
June 11, 2007 at 2:29 pm
Still waiting for a script rounding 2/3.
Is it too hard for you?
Probably you could ask SQL professional for a help?
June 11, 2007 at 5:31 am
Here's myresults:
closest dollar
---------------------
.0000
closest 50 cents
---------------------
.0000
closest 20 cents
---------------------
.2000
closest...
June 11, 2007 at 5:29 am
Viewing 15 posts - 4,081 through 4,095 (of 6,036 total)