Darren Bartrup
Well-known Member
- Joined
- Mar 13, 2006
- Messages
- 1,297
- Office Version
- 365
- Platform
- Windows
I have four tables, each with a dteRefresh field which contains a date value.
Is there a way of returning the maximum date within the four tables in a single query.
I could do it by running a union query and then creating another query to return the maximum date, but I'm hoping there's a way of doing it in a single query - something like the following:
Thanks for any help.
Darren.
Is there a way of returning the maximum date within the four tables in a single query.
I could do it by running a union query and then creating another query to return the maximum date, but I'm hoping there's a way of doing it in a single query - something like the following:
Code:
SELECT MAX(
SELECT dteRefresh
FROM tbl_CORE_AssessmentValidation
UNION SELECT dteRefresh
FROM tbl_CORE_CarersValidation
UNION SELECT dteRefresh
FROM tbl_CORE_JointValidation
UNION SELECT dteRefresh
FROM tbl_CORE_ReviewValidation
)
Thanks for any help.
Darren.