cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
921
Views
20
Helpful
3
Replies

Escape Character in Anonymous Block Report Definition

peterputt
Level 1
Level 1

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

3 Replies 3

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 where
startdatetime between :START and :END and
applicationname = :APP
group by CallHour
order by CallHour

Glad you got it working and thank you for posting what you wound up using/what worked for you.

Getting Started

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: