Hey Brad,
Here’s something we use to see whohasn’t logged in the last 30 days. The query is for the 9.7 schema but acouple modifications and it should do what you need it to do.
/* list users who have not logged in tothe system within the last 30 days */
select k.firstname || ' ' || k.lastname"User Name",
k.name "Login Name",
max(d.auditdate) "Last LoginDate"
from kuaf k,
dauditnew d
where d.performerid = k.id
and not exists (select performerid
from dauditnew
where performerid = k.id
and auditid = 23
and (auditdate >=(sysdate-30)))
and k.deleted <> 1
and k.type = 0
group by k.lastname, k.firstname, k.nameorder by k.lastname
From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: Tuesday, April 29, 2008 7:58AMTo: eLink RecipientSubject: Need SQL query for usersnot logged in for the last year
Need SQL query for users not logged in for the last year
Posted by locgmd01admin (Birth, Brad) on 04/29/2008 09:56 AM
We need to purge users that haven't accessed the instance in the last (period of time), figured it would be similar to: SELECT Name FROM KUAF WHERE ID NOT IN (SELECT UserID FROM DAudit WHERE Event='LOGIN') and type = 0 and deleted = 0 with additional logic in the select, any ideas?