SQL Language (MOSC)

MOSC Banner

SQLPLUS to pull users logins past 180 days

edited Nov 22, 2014 10:01AM in SQL Language (MOSC) 2 commentsAnswered

I have been searching forums, internet etc, and I am at a road block.

I need to pull users from a table based on their last logon time. So I am assuming MAX.

But, here is the tricky part (for me) I want to identify the users that have not login greater than 180 days.

So:

select vt_emphist.empid, max (vt_EMPHIST.LOGON_TIME)
from vt_emphist
group by vt_emphist.empid

Works, but when I try to do:

WHERE VT_EMPHIST.LOGON_TIME < SYSDATE - 180

It bombs

I am guessing it is probably very simple... And I am looking for zebras...

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center