cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1153
Views
3
Helpful
4
Replies

CUIC Report Definition Syntax Error

ln33147
Level 7
Level 7

Hello,

This is regarding a PCCE environment version 12.6(2).

We are developing the below custom report for the Agent Call Details from Termination_Call_Detail:

select DateTime,ANI as CallerNumber, CONCAT(P.FirstName, ' ', P.LastName) AS AgentName, c.EnterpriseName as CallType,
TalkTime as TalkTime_InSec,RingTime,HoldTime,P.LoginName As HRMS, T.StartDateTimeUTC As 'Call Start Time' , T.CallTerminatedDateTimeUTC As 'Call End Time',
DigitsDialed as CalledNumber, T.CallDisposition,RouterCallKey , RouterCallKeyDay, T.AgentPeripheralNumber As Extension
from Termination_Call_Detail T with (nolock), test_awdb.dbo.Call_Type c(nolock),
test_awdb.dbo.Agent A with (nolock), test_awdb.dbo.Person P (nolock)
where T.AgentSkillTargetID=A.SkillTargetID and P.PersonID = A.PersonID and T.CallTypeID = c.CallTypeID and A.SkillTargetID in (:agent_list)

We are getting Syntax Error on (:agent_list).

Any hints?

Thanks in advance.

1 Accepted Solution

Accepted Solutions

Does that query run if you run it in SQL directly on the HDS (and substitute a value for the agent)?

What type of report did you chose (i.e. anonymous block, etc.)?
Also, if you're running this against the HDS, technically Cisco recommends against running against TCD table. I know people do it, but just FYI if you have issues, they may point to you for this.
You may want to hard code in some start dates so that a user doesn't run it for an extended amount of time.

View solution in original post

4 Replies 4

Does that query run if you run it in SQL directly on the HDS (and substitute a value for the agent)?

What type of report did you chose (i.e. anonymous block, etc.)?
Also, if you're running this against the HDS, technically Cisco recommends against running against TCD table. I know people do it, but just FYI if you have issues, they may point to you for this.
You may want to hard code in some start dates so that a user doesn't run it for an extended amount of time.

piyush aghera
Spotlight
Spotlight

Hi, what Value set are you using for :agent_list ? If you select just one agent, does it work? You can run the report in CUIC and check what SQL query it generated after selecting agent(s). This would probably the error with missing single quote between values.

ln33147
Level 7
Level 7

Dear Bill and Piyush,

Thank you for your time. The issue was related to the query type — it was set to SQL Query, whereas it should have been Anonymous Block.

Regards,

Thats good to hear. You may mark Bill's comment as correct answer to close this thread, as he suggested about Anonymous block.

Thanks.