Results 1 to 3 of 3
Thread: Query Help
Dec 16, 2009, 18:18 #1
- Join Date
- Dec 2009
- 0 Post(s)
- 0 Thread(s)
I've been pushed into handling a couple of issues and am in need of some assistance.
I'm attempting to create a query in Access to combine 2 fields of a record. Additionally I need to take that value and return the most recent record for that value (as well as list the records for each other unique value).
I've taken a few cracks at it but I'm missing something. I initially used this post as reference: Combining Fields and tried to crank through it but I'm stuck.
Here's my current attempt:Code:
SELECT ReportData.SubDate, ReportData.VendorCode, ReportData.VendorName, ReportData.Contract & "_" & ReportData.Release AS ContractRelease, ReportData.MngHeadCount, ReportData.BusHeadcount, ReportData.AdminHeadcount FROM ReportData INNER JOIN (SELECT ReportData.ContractRelease, Max(SubDate) AS LastDate FROM ReportData GROUP BY ReportData.ContractRelease) AS B ON (ReportData.ContractRelease=B.ContractRelease) AND (ReportData.SubDate=B.LastDate) ORDER BY ReportData.ContractRelease;
All Headcount Fields=Number(Double)
Thanks for any help!