I'm trying to create a report to get the calls per hour for certain application... My query is running fine, but if I put it into an Anonymous Block, CUIC interprets "::DATETIME" as a parameter:
select startdatetime::DATETIME HOUR TO HOUR AS CallHour, count(*) from contactcalldetail wherestartdatetime between :START and :END andapplicationname = :APPgroup by CallHourorder by CallHour
How can I escape the ":"?
Thanks in advance
I'm not sure if you can, have you tried using the same type of DATEPART SQL parsing that Cisco uses in their report definitions to avoid the issue?
Thanks for the hint. I got it working with:
select TO_CHAR(startdatetime, "%H") CallHour, count(*) from contactcalldetail wherestartdatetime between :START and :END andapplicationname = :APPgroup by CallHourorder by CallHour
Glad you got it working and thank you for posting what you wound up using/what worked for you.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: