Viewing 15 posts - 1,366 through 1,380 (of 2,007 total)
carl.meads (11/14/2011)
SELECT #callhandling2.client
,#callhandling2.daycat+' '+#callhandling2.timecat as [Category]
,Sum(#callhandling2.calls) as [Total Calls]
,[Calls Per 30 Mins] = Case
When #callhandling2.daycat+' '+#callhandling2.timecat='Weekend 20:00-08:00' then if(iserror(Sum(#callhandling2.calls)/2208.0)),0,Sum(#callhandling2.calls)/2208.0
When #callhandling2.daycat+' '+#callhandling2.timecat='Weekend 08:00-20:00' then Sum(#callhandling2.calls)/2208.0
When #callhandling2.daycat+' '+#callhandling2.timecat='Weekday...
November 14, 2011 at 3:57 am
Hello and welcome to SSC!
The main reason that you are not getting any replies for your question, it that we don't have enough information from you to answer!
For starters, it...
November 14, 2011 at 3:15 am
You're right drew, didn't think about that. This works though: -
SELECT DATEADD(DAY, DATEDIFF(DAY, 6, @calenderDate) /7 * 7, 5)
November 11, 2011 at 10:11 am
mvijaykumar.mca (11/11/2011)
ID
---
2|4|6
These 2,4 and 6 are actually a primary key values of a...
November 11, 2011 at 10:05 am
jbrewer (11/11/2011)
November 11, 2011 at 9:51 am
Try this: -
SELECT DATEADD(DAY, DATEDIFF(DAY, 5, @calenderDate) /7 * 7, 5)
DECLARE @calenderDate SMALLDATETIME
SET @calenderDate = '2011-11-04'
SELECT DATEADD(DAY, DATEDIFF(DAY, 5, @calenderDate) /7 * 7, 5)
SET @calenderDate = '2011-11-05'
SELECT DATEADD(DAY, DATEDIFF(DAY, 5,...
November 11, 2011 at 9:42 am
Is this what you're after?
SELECT DATEADD(D, -6, DATEADD(D, DATEDIFF(D, 6, DATEADD(M, 12 * DATEPART(YY, GETDATE()) + DATEPART(M, DATEADD(M, -1, GETDATE())) - 22801, 6)) / 7 * 7, 6)) AS firstSunday_minus_6,
DATEADD(D,...
November 11, 2011 at 9:04 am
You're missing brackets Brandie: -
EXECUTE (@sqlstmt);
November 11, 2011 at 8:30 am
sc-w (11/10/2011)
1:True| False | True
2:False | False ...
November 10, 2011 at 10:12 am
What happens if you add COLLATE ?
BEGIN TRANSACTION
DECLARE @MyId CHAR(11)
DECLARE @MyEmail VARCHAR(255)
DECLARE @MyFirstname VARCHAR(255)
DECLARE @MySubject VARCHAR(MAX)
DECLARE @MyBody VARCHAR(MAX)
DECLARE @stime DATETIME
DECLARE @etime DATETIME
DECLARE @ftime INT
DECLARE @passeddays INT
DECLARE @temp INT
SELECT @stime =...
November 10, 2011 at 9:50 am
Seriously? Have you seen how many times you hit the "prospects" table every time your god-awful cursor runs?
If I feel particularly masochistic this weekend, I might have a look. To...
November 10, 2011 at 9:41 am
*sigh*
OK, here is my guess at your requirements. If I'm incorrect, read this article (http://www.sqlservercentral.com/articles/Best+Practices/61537/)[/url] then post DDL and readily consumable sample data.
First, here is the sample data I've used.
IF...
November 10, 2011 at 6:27 am
matt_scott1984 (11/10/2011)
I have the following code:
SELECT TOP (100) PERCENT tr_trrefn, tr_abbrv,
...
November 10, 2011 at 5:39 am
anthony 80098 (11/10/2011)
I've managed to figure this one out by simply adding 15 footer records to my group and then hiding these when i have records to display. This...
November 10, 2011 at 4:18 am
Viewing 15 posts - 1,366 through 1,380 (of 2,007 total)