M
Monish
I have a Union of 4 "TOP" queries, each of which is ordered as per the TOP
function, by Field A.
I need the output of this Union Query to sort first by Field B, then by
Field A
How do I set the sort for the entire Union - having already set a sort for
each part
of the union?
Below is a part of my Union Query:
SELECT TOP 5 [Account Name], Eligibles, Description, [Mail Date], [Week
Tracker] AS WeekNumber
FROM QryWeeklyReportDroppedML
WHERE [Week Tracker] = 'Current Week'
ORDER BY Eligibles DESC, [Mail Date]
UNION ALL
SELECT TOP 5 [Account Name], Eligibles, Description, [Mail Date], [Week
Tracker] AS WeekNumber
FROM QryWeeklyReportDroppedML
WHERE [Week Tracker] = 'Week - 1'
ORDER BY Eligibles DESC, [Mail Date]
Where I need to sort the output by Mail Date and then within that by Eligibles
Thanks for taking the time to read this and thanks in advance for any
assistance!
function, by Field A.
I need the output of this Union Query to sort first by Field B, then by
Field A
How do I set the sort for the entire Union - having already set a sort for
each part
of the union?
Below is a part of my Union Query:
SELECT TOP 5 [Account Name], Eligibles, Description, [Mail Date], [Week
Tracker] AS WeekNumber
FROM QryWeeklyReportDroppedML
WHERE [Week Tracker] = 'Current Week'
ORDER BY Eligibles DESC, [Mail Date]
UNION ALL
SELECT TOP 5 [Account Name], Eligibles, Description, [Mail Date], [Week
Tracker] AS WeekNumber
FROM QryWeeklyReportDroppedML
WHERE [Week Tracker] = 'Week - 1'
ORDER BY Eligibles DESC, [Mail Date]
Where I need to sort the output by Mail Date and then within that by Eligibles
Thanks for taking the time to read this and thanks in advance for any
assistance!