This should be easy but I'm having a tough time with it.
What I need is to find out how much time has elapsed since a certain user last executed a process on the server and return the number of minutes.
SELECT last_batch
from sysprocesses
where hostname = 'Server1'
and loginame = 'johndoe'
and last_batch > '2007-09-13 11:00:00.000'
Thanks...
What I need is to find out how much time has elapsed since a certain user last executed a process on the server and return the number of minutes.
SELECT last_batch
from sysprocesses
where hostname = 'Server1'
and loginame = 'johndoe'
and last_batch > '2007-09-13 11:00:00.000'
Thanks...