Viewing 15 posts - 25,771 through 25,785 (of 26,490 total)
And it is your choice not to use it. That doesn't mean that the rest of us has to live by your choice. We are free to make what ever...
June 18, 2007 at 11:03 pm
So, if using long division and I stop at 0.0450 (4 decimal positions of precision) and then do a bankers round to 2 decimal positions and round down to .04,...
June 18, 2007 at 10:40 pm
Made another modification to my decimal version:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[fn_BRound] (
@val decimal(38,20),
@pos int
)
RETURNS decimal(38,20)
as begin
declare @tmpval1 int,
@tmpval2 decimal(38,20),
@retval decimal(38,20),
@tmpval3 decimal(38,20),
...
June 18, 2007 at 10:00 pm
Which is not a problem with the function itself but with how SQL Server handles the 5/111.111, so get off it.
![]()
June 18, 2007 at 6:27 pm
I believe you need to have SP 2. My trouble is I can't get the database engine to install. Did you have troubles installing initially?
June 18, 2007 at 4:05 pm
Made a couple of mods, and here are my changes:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[fn_BRound] (
@val decimal(38,20),
@pos int
)
RETURNS decimal(38,20)
as begin
declare @tmpval1 int,
@tmpval2 decimal(38,20),
@retval decimal(38,20),
...
June 18, 2007 at 3:28 pm
Would someone like to test the following and let me know how it works?
ALTER FUNCTION [dbo].[fn_BRound] (
@val decimal(38,20),
@pos int
)
RETURNS decimal(38,20)
as begin
declare @tmpval1 int,
@tmpval2 decimal(32,20),
@retval decimal(32,20)
...
June 18, 2007 at 2:42 pm
I have a 64-bit server here at work, what is the final code?
June 18, 2007 at 12:18 pm
From your post, I can't tell if the data you are showing is your data or the result you are looking for. What would help is the DDL for your...
June 18, 2007 at 8:44 am
Jay,
Yes, the code creates a stored procedure that will insert a record into the SalesCopy table. The stored procedure requires that you pass 10 values to the procedure represented by...
June 18, 2007 at 7:53 am
Jeff,
My Forum Subscriptions. Find this one, mark it and delete.
Later!
![]()
June 14, 2007 at 10:47 pm
Been on vacation, but haven't missed any of this. It offered humor while winding down after a hard day of fun.
Just thought I'd make sure of something though: Both multiplication...
June 14, 2007 at 9:50 pm
Yes, that was a true act of wit! ![]()
June 8, 2007 at 2:57 pm
You may want a Calendar table in your database. Do a search of thetopics and articles on this site, and I am sure you will find something to help you.
June 8, 2007 at 1:38 pm
Give this a try:
select
TheDate,
sum(Count30),
sum(Count60),
sum(Count90),
sum(Count120),
sum(CountOver120)
from
(select
dateadd(dd,datediff(dd,0,dteNative),0) as TheDate,
case when datediff(mi, dteNative, dteDocProcess) between 0 and 30 then 1 else 0 end as Count30,
...
June 8, 2007 at 12:59 pm
Viewing 15 posts - 25,771 through 25,785 (of 26,490 total)