|
Posted by Chris on 01/26/06 00:12
Awesome Hugo, thanks so much for the help - My query is now nearly
complete; with one last problem.....
declare @today datetime,
@tomorrow datetime,
@offered smallint,
@answeredin120 smallint,
@GOS smallint
set @today = convert(char(8), GETDATE ( ), 112)
set @tomorrow = @today + 1
-- Find total calls offered
set @offered = (select COUNT(Result) from dbo.QueueEncounter
where Direction='0' and QueueID='1438' and Time >= @today and Time <
@tomorrow)
-- Find total calls answered in 120 seconds
set @answeredin120 =(select COUNT(Result) from dbo.QueueEncounter
where Direction='0' and QueueID='1438' and Time >= @today and Time <
@tomorrow and WaitTime <= 120)
-- Divide the total calls offered by the total calls answered in X
multiplied by 100 to find current GOS ????
set @GOS = (@offered)/(@answeredin120)*100
select @GOS
The problem is my GOS is being returned as 100 when it is really apprx
77%.
Where did I go wrong?
-Thanks!
Navigation:
[Reply to this message]
|