Reply to Re: Help creating a SELECT statement for "today"

Your name:

Reply:


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!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация