Created
January 30, 2015 12:29
-
-
Save StaniTr/bd2375743affcc3ec1b5 to your computer and use it in GitHub Desktop.
Entries LOGON Only (w/o LOGOFF)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Session_ID, TIMESTAMP, datediff(DAY, puzzsessions.TIMESTAMP, sysdatetime()) daysLogged --logOn time - (current)system time | |
FROM puzzSessions | |
--logon | |
WHERE ActionName='LOGON' AND session_id NOT IN | |
-- no LOGOFF | |
(SELECT Session_ID | |
FROM puzzSessions | |
WHERE ActionName='LOGOFF') | |
ORDER BY TIMESTAMP DESC --login from 15th and 16th dec 2014 :))) | |
--RESULT: 31 IDs - 3 LOGONs w/o LOGOFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment