Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 21 Apr 2009 @ 09:28:31 GMT


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


Subj:   Re: SELECT Subquery
 
From:   Fred Newbrough

Hi Shaun

You can do what you want by using a subquery:

Try something like this. I left the loan table out but it can easily be joined back in

     Select Loan_Id,Amount

     FROM
     Tran t1,Loan l
     WHERE
     PostDate IN (SELECT MAX(Post_Date) FROM Tran t2 WHERE t1.LoanID=t2.LoanID and
     Tran_Type='D');

-Fred



     
  <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