cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
699
Views
0
Helpful
1
Replies

IPCC HDS

alsalameh102
Level 1
Level 1

Hello , i'me currently searching for a table contains historical data for IPCC DB per agent per log in period , not per half hour  or five minutes as existed .

the question  : Is there any table or join of tables contains historical data record for the agent for each login period(from the login to the logout date) , So i will get accurate data .? thanks,

1 Reply 1

Tanner Ezell
Level 4
Level 4

Alaa,

You want the Agent State Detail table. Make a join based on two tables, one table which is the login, and one table which is the logout. Join the two based on agentID and any other conditions you require.

Example of login table:

SELECT agentID, eventDateTime AS loginTime, eventType

                FROM dbo.AgentStateDetail AS ASD1

                JOIN dbo.Resource AS r ON ASD1.agentID = r.resourceID

                WHERE eventType = 2 AND r.dateInactive >= @startDateTime

Example of logout table:

SELECT agentID, eventDateTime AS logoutTime, eventType

                FROM dbo.AgentStateDetail AS ASD2

                JOIN dbo.Resource AS r ON ASD2.agentID = r.resourceID

                WHERE eventType = 3 AND r.dateInactive >= @startDateTime

Join the two, do a date diff and you'll have the duration between the two states. In this example, ready/notready times. Change eventType to suit your needs.

Tanner Ezell www.ctilogic.com
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: