Hello, I want to create a report which has information about last login date of users. I have approx. 310 users and I am using PPM 9.10. I want this for all 310 users.
How can I create this ?
User Name Last Login Date
Go to Solution.
use this query
select max(nla.creation_date) LAST_LOGIN, round(sysdate - max(nla.creation_date)) DAYS_FROM_LOGIN, np.product_name PRODUCT_NAME, (nu.first_name || ' ' || nu.last_name) FULL_NAME, nu.username USERNAME, nu.user_id USER_ID, nu.creation_date CREATION_DATEfrom KNTA_USERS nu, KNTA_LOGON_ATTEMPTS nla, KNTA_USER_PRODUCTS nup, KNTA_PRODUCTS npwhere nup.user_id = nu.user_idand (( nu.end_date is NULL) OR ( nu.end_date > sysdate ) )and np.product_id = nup.product_idand nu.user_id = nla.user_id (+)group by nu.user_id, nu.username, nu.first_name, nu.last_name,np.product_name, nu.creation_dateorder by 2 desc
You can include the following if you want to limit the output to successful login attempts:
and nla.success_flag(+) = 'Y'
This is exactly what I need too but I keep getting the following error:
SQL exception:ROR-00923: FROM keyword not found where expected
Anyone else have issues?
I am not sure this solution solves your problem but it may helpful.
Also, I encountered invalid character error in the first try. The problem is solved by deleting hidden last character after desc.