J
Jeff Polack
I am attempting to create a query that selects the latest closing date for a
set of transactions that are related to a given deal. This is the SQL string
that has been built thus far:
SELECT TOP 5 A.Debt AS PWR, A.SponsorName, A.CompanyName, C.Description,
C.DealSize, C.DealStatus, (SELECT TOP 1 B.CloseDate FROM
[qryTransactions-ReportActiveBankerAll] as B WHERE (B.DealID = A.DealID)
ORDER BY B.CloseDate DESC) AS CloseDate
FROM [qryTransactions-ReportBankerDealsAll] AS A LEFT JOIN
[qryTransactions-ReportActiveBankerAll] AS C ON A.DealID = C.DealID
WHERE (((A.Debt) Is Not Null) AND ((C.ProductRollUp)="Debt"))
ORDER BY A.Debt DESC , A.SponsorName, A.CompanyName;
When I try and run the query, I receive the following error:
The Microsoft Jet database engine does not recognize <name> as a valid field
name or expression.
Where <name> is the name of the query that is attempting to execute the
above SQL string (i.e., the current query). I've gone back and double/triple
checked the spelling of the fields from the underlying tables and not
identified any errors.
Any guidance on what I'm missing?
Thanks in advance!
set of transactions that are related to a given deal. This is the SQL string
that has been built thus far:
SELECT TOP 5 A.Debt AS PWR, A.SponsorName, A.CompanyName, C.Description,
C.DealSize, C.DealStatus, (SELECT TOP 1 B.CloseDate FROM
[qryTransactions-ReportActiveBankerAll] as B WHERE (B.DealID = A.DealID)
ORDER BY B.CloseDate DESC) AS CloseDate
FROM [qryTransactions-ReportBankerDealsAll] AS A LEFT JOIN
[qryTransactions-ReportActiveBankerAll] AS C ON A.DealID = C.DealID
WHERE (((A.Debt) Is Not Null) AND ((C.ProductRollUp)="Debt"))
ORDER BY A.Debt DESC , A.SponsorName, A.CompanyName;
When I try and run the query, I receive the following error:
The Microsoft Jet database engine does not recognize <name> as a valid field
name or expression.
Where <name> is the name of the query that is attempting to execute the
above SQL string (i.e., the current query). I've gone back and double/triple
checked the spelling of the fields from the underlying tables and not
identified any errors.
Any guidance on what I'm missing?
Thanks in advance!