swood
Posts: 474
Score: 5 Joined: 12/6/2001 Status: offline
|
I do like the query you linked and wondered if you might answer a question for me. I've tweaked your query to allow me to add the Timestamp from the view you were using and it appears to pull the best data for us. However I can't quite figure out how to limit the date / timestamp field to show just the most recent date. Have any idea? Here's my / your code SELECT CS.Name0 AS 'Computer', isnull(CS.UserName0,HCS.UserName0) AS 'User Name' , HCS.TimeStamp FROM v_GS_COMPUTER_SYSTEM CS Left outer join v_HS_COMPUTER_SYSTEM HCS on CS.ResourceID = HCS.ResourceID WHERE HCS.UserName0 is not NULL Group by CS.Name0, CS.UserName0, HCS.UserName0, HCS.TimeStamp order by CS.Name0
_____________________________
Sandy Wood Network Admin Orange County District Attorney
|