Viewing 15 posts - 25,771 through 25,785 (of 26,487 total)
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
Some sample data and output results would help understand what you are looking for better.
June 8, 2007 at 12:27 pm
Building on Steve's, try this:
create table dbo.MyTable (roomtype varchar(4), amenity int)
go
create function dbo.RoomTypes(
@AmenityList varchar(8000) -- varchar(max) -- for SQL Server 2005
)
returns @roomtypes table (roomtype varchar(4))
as
begin
declare @temprooms table (
...
June 8, 2007 at 11:59 am
It is adding an escape character so that the original ] in the string is still treated as a character in the string. If you read BOL and think you'll...
June 8, 2007 at 11:06 am
Viewing 15 posts - 25,771 through 25,785 (of 26,487 total)