12-20-2016 07:34 AM - edited 03-17-2019 09:00 AM
I need assistance with a UCCX SQL query.
SELECT ACD.sessionSeqNum,CCD.sessionSeqNum,CCD.sessionID,CCD.STARTDATETIME, CCD.ENDDATETIME, ACD.STARTDATETIME, CCD.CONTACTTYPE,CCD.transfer,CCD.customVariable10,CCD.customVariable9 FROM ContactCallDetail as CCD left join AgentConnectionDetail as ACD on CCD.SESSIONID=ACD.SESSIONID AND CCD.sessionSeqNum = ACD.SessionSeqNum
Query Results:
ACD.sessionseqnum |
CCD.sessionseqnum |
sessionid |
Startdatetime(CCD) |
Enddatetime(CCD) |
startdatetime(ACD) |
contacttype |
transfer |
customvariable10 |
customvariable9 |
0 |
15000000360 |
35:17.3 |
35:28.1 |
1 |
f |
||||
1 |
1 |
15000000360 |
35:27.9 |
36:01.2 |
35:44.7 |
4 |
t |
||
2 |
15000000360 |
36:01.2 |
36:24.9 |
5 |
f |
||||
0 |
15000000357 |
30:21.3 |
30:33.5 |
1 |
f |
||||
1 |
15000000357 |
30:33.3 |
30:49.6 |
4 |
f |
||||
2 |
15000000357 |
30:49.5 |
31:54.1 |
4 |
f |
I am interested in combining records with the same sessionID into 1 record. For example, session ID 15000000357 should have the min startdatetime (CCD), min startdatetime(ACD) and max endatetime(CCD), along with the other details.
Any suggestions on how to conquer this?
12-27-2016 02:18 AM
Hello,
Are you hoping to do this on the UCCX SQL server? If so, that won't be possible. Your best bet would be to duplicate the data to another SQL server and to do what you were hoping to do on that SQL server. Then, you would need to create your reports querying that server.
Now, this is a short answer to a potential deep topic, so hopefully that'll be good for starters.
Thanks,
James
12-30-2016 11:33 AM
It is possible to run that query on the UCCX server. My question was directed at combining records with the same session ID. I use a nifty tool called Server Studio to extract data.
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