Hiya all,
Having a bit of a problem with a procedure.
We have a table that contains multiple fields, the three that I am interested in are call username, session and creation_date.
When a user logs in, a trigger inserts a row containing the users username (username), the date and time (creation_date) and the string 'STORESESSION' (session). When the user logs out, it inserts the users username (username), the date and time (creation_date) and the string 'LOGOUT' (session).
OK, here the bit that is bugging me. I need to create a procedure that when I input a start date and time, and a time period, shows me all the users that where logged on during that time (including any users that logged on/off). The query would need to list the username, the date/time of logged in and (if known) the date time of logged out.
Any ideas?
Thanks
Clone05
Having a bit of a problem with a procedure.
We have a table that contains multiple fields, the three that I am interested in are call username, session and creation_date.
When a user logs in, a trigger inserts a row containing the users username (username), the date and time (creation_date) and the string 'STORESESSION' (session). When the user logs out, it inserts the users username (username), the date and time (creation_date) and the string 'LOGOUT' (session).
OK, here the bit that is bugging me. I need to create a procedure that when I input a start date and time, and a time period, shows me all the users that where logged on during that time (including any users that logged on/off). The query would need to list the username, the date/time of logged in and (if known) the date time of logged out.
Any ideas?
Thanks
Clone05