/ Published in: SQL
Query to find the most recent logins for a particular user ( find 1 years worth )
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT fl.login_id, fl.start_time, fl.end_time, fl.pid, fl.spid, fl.terminal_id, fl.login_name, fl.session_number, fl.submitted_login_id, fl.serial#, fl.process_spid, fl.login_type, fuv.user_name, fuv.description FROM FND_LOGINS fl, apps_fnd.fnd_user_v fuv WHERE fl.user_id = fuv.user_id AND fuv.user_name = :P_USER_NAME AND fl.start_time > (sysdate - 365) ORDER BY fl.start_time DESC