solun
Programmer
- Apr 1, 1999
- 55
I know this type of question gets answered a lot, and I've tried several of the various answers... just when i think i'm making progress, something else breaks!
I'm trying to write a SQL statement that retrives several fields from a record that is selected because its date is the highest of several options. In English: Get the set of applications related to Loan17. Find the one with the last date. Get several fields from that record.
SELECT A.*
FROM LoanDetailsApplications AS A
WHERE A.ApplicationID=
(SELECT ApplicationID, Max(B.DateApp)
FROM LoanDetailsApplications AS B
WHERE B.LoanID=17);
So, what am I doing wrong?
Thanks much,
Heidi
Heidi I. Jones
Ridgerunner Consulting
Questions Answered. Problems Solved.
I'm trying to write a SQL statement that retrives several fields from a record that is selected because its date is the highest of several options. In English: Get the set of applications related to Loan17. Find the one with the last date. Get several fields from that record.
SELECT A.*
FROM LoanDetailsApplications AS A
WHERE A.ApplicationID=
(SELECT ApplicationID, Max(B.DateApp)
FROM LoanDetailsApplications AS B
WHERE B.LoanID=17);
So, what am I doing wrong?
Thanks much,
Heidi
Heidi I. Jones
Ridgerunner Consulting
Questions Answered. Problems Solved.