Floetic Posted May 16, 2007 Share Posted May 16, 2007 -- (1) Number of calls received for each priority of call [for a specified date range]declare @startdate datetime,@finishdate datetimeselect RM.fldPriorityCode as 'Priority',count(RM.fldRequestID) as 'Calls'from tblRequestMaster RMwhere RM.fldPriorityCode between 1 and 5and RM.fldRequestDate between '01-01-2007' and '03-05-2007'and RM.fldRequestFlag like 'D'group by RM.fldPriorityCode unionselect 'Total' as 'Priority',count(RM.fldRequestID) as 'Calls'from tblRequestMaster RMwhere RM.fldPriorityCode between 1 and 5and RM.fldRequestDate between '01-01-2007' and '03-05-2007'and RM.fldRequestFlag like 'D'order by RM.fldPriorityCode asc Results:Priority Calls 1 20 2 2912 3 152 4 571 5 4 Total 3659 I would like to transfer these results to an excel sheet. For instance when the user opens up the excel worksheet and types in for a example a start date: 01-01-2007 and an end date: 03-05-2007 (into textboxes) then clicks a button say called 'Get stats' and then the results appear on the sheet.How can this be done? Link to comment Share on other sites More sharing options...
Skemcin Posted May 16, 2007 Share Posted May 16, 2007 a.) What database and version are you using?b.) If this is web based, what server side scripting language do you have access to (asp, php, coldfusion)? Link to comment Share on other sites More sharing options...
Floetic Posted May 18, 2007 Author Share Posted May 18, 2007 a. Microsoft SQL Enterprise Manager 8.0Console Root > Microsoft SQL Servers > SQL Server Group > BOISSQL (Windows NT) > DatabaseS > BacktraqFMb. I think that I am looking to maybe create an active control in Visual Basic which I can attach to a new sheet in excel so that the results can be brought to the excel sheet once the user has clicked on 'Get stats' button or something like that ... But I havent a clue how to go about doing this and how everything would link up together in order for this to work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.