Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 28 Mar 2012 @ 14:06:07 GMT


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


Subj:   Re: Second minimum date
 
From:   frank.p.oconnor

Hi

You could perhaps try this query or a variant of it.

     SELECT
     username
     , (logondate (DATE, FORMAT 'yyyy-mm-dd')) || ' '
     || (logontime (INTEGER, FORMAT '99:99:99')) AS logondatetime
     , ROW_NUMBER() OVER (PARTITION BY username ORDER BY logondatetime ASC) AS rn
     FROM dbc.logonoff
     WHERE username = USER
     QUALIFY rn =2;

Good luck


Regards

Frank

Frank O'Connor
AIB Bank



     
  <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