07-29-2025 02:44 AM
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.
Solved! Go to Solution.
07-29-2025 05:01 AM
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.
07-29-2025 05:01 AM
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.
07-30-2025 07:08 AM
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.
07-30-2025 11:19 PM
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,
07-31-2025 09:42 AM
Thats good to hear. You may mark Bill's comment as correct answer to close this thread, as he suggested about Anonymous block.
Thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide