cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
615
Views
0
Helpful
2
Replies

UCCX SQL Query

aaron.banks11
Level 1
Level 1

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?

2 Replies 2

james.buchanan1
Level 1
Level 1

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

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.