Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Venu@wfis
Starting Member
16 Posts |
Posted - 2009-09-24 : 08:36:05
|
| Background: Hi, We have a Test Management tool QC. Users access this web application to do all test managerial activities. All I need is to get the list of usernames and their last login time to Quality Center. We can fetch these details from Td.Users (Users info) and Td.sessions_History table (user_name, LastLogintime). (User_name being the key).Issue: 'I need to fetch the username, Lastlogin time' fro users who have not logged in for more than six months. I am able to get the list of users who have not logged for certain period of time, however i still need to know their last login time as well. Below is the query:select user_name from td.users where user_name not in(select user_name from td.sessions_historywhere start_time between '2009-06-16 00:00:00' and '2009-09-16 00:00:00') Can you pleas help me finding a way for fetching this report. Thank you. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-24 : 08:43:11
|
| To get last login for all the usersselect user_name,max(start_time) as start_time from td.sessions_historygroup by user_nameMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|