SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Query question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fchachar
Starting Member

15 Posts

Posted - 11/08/2012 :  16:30:09  Show Profile  Reply with Quote
This sound stupid but I was wondering if anyone of you could help me achieve this goal.

I have a list of users I would say about 4500 so I am using this Query.

SELECT Username, MAX(TimeEntered) as [Last Accessed System]
FROM AuditEvent
LEFT JOIN AuditType ON AuditEvent.TypeID = AuditType.TypeID
Where Username IN
-- There are about 4500 Users here.
('User1', 'User2', 'User3', 'Usern')
GROUP BY Username
ORDER BY [Last Accessed System]

The results return with 3120 transactions, my question is how do I find out about those who missed out of 4500. 1380 did not make any transaction or create any entry in the Table, I am interested to know the usernames of 1380 users. How do I get that?

Thanks.

Edited by - fchachar on 11/08/2012 16:30:41

bandi
Flowing Fount of Yak Knowledge

India
2168 Posts

Posted - 11/09/2012 :  00:31:41  Show Profile  Reply with Quote
Do you have 4500 users Details Table?

Write Cross checking Logic to find 1380 users by the help og UserDetails Table..........



--
Chandu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000