Viewing 15 posts - 1,906 through 1,920 (of 7,429 total)
This has added logic to validate after a friday holiday to move to monday.
create function fn_NextTrDate(@TrDate datetime)
returns datetime
as
begin
-- knock off the time part.
SET @TrDate = dateadd(d,datediff(d,0,@TrDate),0)
-- advance to next...
May 17, 2004 at 11:10 am
SELECT
...
FROM
tblName
WHERE
Col1 = Col2 AND
Col1 = Col3 AND
Col1 = Col4
Should do it.
May 17, 2004 at 6:04 am
I am thinking like this
create function fn_NextTrDate(@TrDate datetime)
returns datetime
as
begin
-- This line strips the time value out.
SET @TrDate = dateadd(d,datediff(d,0,@Tr_Date),0)
--advance to next date (not using datepart because of @@datefirst concerns)
...
May 17, 2004 at 6:02 am
Are you just wanting to get rid of these or do you have copies of what they should be. If you have copies then try sp_delete_job. If that fails then...
May 17, 2004 at 5:55 am
If you know the SQL Server Agent account password, try logging into the server and try to hit the share as the Agent account to see if it happens outside...
May 17, 2004 at 5:50 am
Is this box a part of the domain and is the group account local or on the domain itself?
May 17, 2004 at 5:48 am
Something like this should do the trick.
SELECT
PRODUCT,
PERIOD,
REP,
CASE
WHEN (CAST(n.[VALUES] as Numeric(10,3))/CAST(s.TOT_VALUE as Numeric(10,3)))*100 < 10 THEN 'Cat1'
WHEN (CAST(n.[VALUES] as Numeric(10,3))/CAST(s.TOT_VALUE as Numeric(10,3)))*100 < 20 THEN 'Cat2'
WHEN (CAST(n.[VALUES] as Numeric(10,3))/CAST(s.TOT_VALUE as Numeric(10,3)))*100...
May 17, 2004 at 5:41 am
I have heard nothing on depricating WITH CUBE from the group by syntax and there are no notices on this anywhere I can find where it is being considered.
May 17, 2004 at 5:32 am
In case you have purposefull spaces. See what happens with these
select len('a ')
select datalength('a ')
First will return 1 the second 3 becuase len ignores the trailing spaces.
May 17, 2004 at 5:29 am
Ok two things.
1) Is @username the first parameter in yuor actuall stored procedure? If not can you post the header (the stuff before the opening AS) for us?
2) Try setting...
May 17, 2004 at 5:20 am
Ok so you need to drop the time to 0. Try this on your date.
dateadd(d,datediff(d,0,your_date),0)
and you should end up with the resulting value you need for the situation.
Then to make...
May 17, 2004 at 5:12 am
Would have to see the code to see where maybe you made a mistake.
May 16, 2004 at 12:57 pm
I think it is probably a question of the dates that you consider a holiday that needs to be accounted for.
May 16, 2004 at 12:55 pm
Viewing 15 posts - 1,906 through 1,920 (of 7,429 total)