Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 21 Apr 2009 @ 09:32:53 GMT


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


Subj:   Re: SELECT Subquery
 
From:   Ambekar, Harshad

Hi,

The query you are using is called SCALAR query and it is not available upto TD 12. You can use this query on TD 13 (as per TD 13 overview documentation). To resolve your query use dervied table.

     SELECT
                     Loan.LoanID,
                     Tran1.Tran_Amount
     FROM
                     Loan,
        (SELECT TOP 1 Amount as Tran_amount from Tran WHERE Tran.Type = 'D'
     ORDER BY PostDate DESC)  Tran1
     WHERE Tran1.LoanID = Loan.LoanID
     ;

Hope this will help.

-- Harshad



     
  <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