cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
788
Views
0
Helpful
0
Replies
s.orlov
Beginner

CUIC custom report Select in Select

We would like to create the custom Database query Reports for our customer without the using the SQL procedure. To create the SQL query's we use the SQuirreLSQL app and all our scripts are running successfully directly with no  any problems. But if we move the script to the CUIC to create the custom report the problem with the creating fields arise. For example we create the following script with Select in Select:

 

SELECT DISTINCT ContactCallDetail.contactdisposition AS ContactDisposition, ContactCallDetail.contacttype AS contactType, ContactCallDetail.startdatetime AS StartDateTime,
ContactCallDetail.enddatetime AS EndDateTime, ContactCallDetail.originatordn AS OriginatorDN, ContactCallDetail.destinationdn AS destinationDN, ContactCallDetail.applicationname AS ApplicationName,
ContactCallDetail.originatortype AS OriginatorType, ContactQueueDetail.queuetime AS queuetime,
(SELECT MIN(ccd.StartDateTime)
FROM ContactCallDetail AS ccd, agentconnectiondetail
WHERE ccd.destinationdn = ContactCallDetail.originatordn
) as isCalledToday
FROM ContactCallDetail LEFT JOIN ContactQueueDetail ON ContactCallDetail.sessionid = ContactQueueDetail.sessionid

This script run successfully directly in the Database and in the CUIC without the second Select (highlighted). But with the second select the Field isCalledToday can not be created as expected and CUIC use the all second Select query as the Field.

Please see the attached screenshots for the more details.

Could you please to advice me the correct format for the query?

0 REPLIES 0
Content for Community-Ad