cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
661
Views
20
Helpful
3
Replies
peterputt
Beginner

Escape Character in Anonymous Block Report Definition

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
bill.king1
VIP Engager

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.

Create
Recognize Your Peers
Content for Community-Ad