11-12-2021 12:32 AM
Hi
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 where
startdatetime between :START and :END and
applicationname = :APP
group by CallHour
order by CallHour
How can I escape the ":"?
Thanks in advance
Peter
11-12-2021 05:37 AM
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?
11-14-2021 11:56 PM
Thanks for the hint. I got it working with:
select TO_CHAR(startdatetime, "%H") CallHour, count(*) from contactcalldetail where
startdatetime between :START and :END and
applicationname = :APP
group by CallHour
order by CallHour
11-15-2021 04:36 AM
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: