Contact Center Reporting

« Back to Contact Center Reporting

Automatic reply: New Message from Gerard O'Rourke in Contact Center Reporti

Combination View Flat View Tree View
Threads [ Previous | Next ]
I would like to be able to create a report which outputs just the first 10 results from an SQL query.
 
My SQL query is fine when I run it on the server, but if I create the Report Definiation, it will not allow you use TOP (10) in the Query.
Anyone have any ideas to be able to work around this issue?
Is there another way to achieve the same result or does anyone know why I am unable to use TOP (10) in the SELECT Query?
Regards,
Gerry
 
 
 
 

I'm currently overseas till Nov 5th with limited access to email. I will try to respond to your request in a timely fashion.

I am out of the office until 10/26/2012.

I am on PTO with limited access to email and phone.



Note: This is an automated response to your message "New Message from
Gerard O'Rourke in Contact Center Reporting (CCR) - Contact Center
Reporting: Unable to use SELECT TOP (10) on CUIC Report Definition?" sent
on 10/21/2012 01:02:05 PM.

This is the only notification you will receive while this person is away.


Prime Therapeutics made the following annotations
---------------------------------------------------------------------
CONFIDENTIALITY NOTICE: The information contained in this communication may be confidential, and is intended only for the use of the recipients named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.


---------------------------------------------------------------------

Got this working ages ago.
Should have update this dicussion.
below is a Report which grabs the last 20 calls.
You can filter on ANI so you only see the calls you made etc.
Very useful for troubleshooting and finding out what the Dialed number is, if the dialplan is not well designed.
http://orourke.tv/web/doku.php?id=cisco:uc:icm:sql
http://orourke.tv/web/lib/exe/fetch.php?media=cisco:uc:icm:last20calls-callroutedetail_v1-02.zip
Below is an extract of the SQL
SET ARITHABORT OFF SET ANSI_WARNINGS OFF SET NOCOUNT ON
SELECT TOP (20)
StartDateTime = Route_Call_Detail.DateTime,
DBDateTime = Route_Call_Detail.DbDateTime,
ANI = ISNULL(Route_Call_Detail.ANI,'NULL'),
DialedNumberString = Route_Call_Detail.DialedNumberString,
RoutingClientID = Route_Call_Detail.RoutingClientID,
RoutingClientName = Routing_Client.EnterpriseName,
..
..
..
..
FROM
Route_Call_Detail(nolock),
Script(nolock),
Master_Script(nolock),
Call_Type(nolock),
Routing_Client(nolock)
WHERE
(Route_Call_Detail.ScriptID = Script.ScriptID) AND
(Script.MasterScriptID = Master_Script.MasterScriptID) AND
(Route_Call_Detail.CallTypeID = Call_Type.CallTypeID) AND
(Route_Call_Detail.RoutingClientID = Routing_Client.RoutingClientID)AND
(Route_Call_Detail.DbDateTime > GetDate()-1)
ORDER BY
Route_Call_Detail.DbDateTime DESC