Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 19 Jun 2013 @ 12:34:35 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Query to find users not logged in since long days
 
From:   Dave Wellman

Hi,

Try something like this

     SELECT databasename
     FROM dbc.databasesv
     WHERE dbkind = 'U'
     AND databasename NOT IN (SELECT username
                              FROM dbc.logonoffv
                              WHERE logdate >= DATE-60
                              GROUP BY 1
                              )
     ORDER BY 1;

Cheers,

Dave

Ward Analytics Ltd - Information in motion (www.ward-analytics.com)



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023