|
|
Archives of the TeradataForum
Message Posted: Tue, 21 Apr 2009 @ 09:32:53 GMT
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
| |