J
Jeff Polack
I've searched the boards and am perplexed. What is the best way to rank a
query that is ordered based on the descending value of a SumOf field? Code
that fails appears below.
TIA
---------------------------------
SELECT TOP 10 Q.Year, Q.[MANAGER-NAME], Sum(Q.ManagerFees) AS AllProducts,
(SELECT Count(*) FROM [qryMktShare-Domestic-LeagueTableMaster] Q1 WHERE
Q1.[MANAGER-NAME] = Q.[MANAGER-NAME] AND Sum(Q1.ManagerFees)<
Sum(Q.AllProducts)) AS Rank
FROM [qryMktShare-Domestic-LeagueTableMaster] AS Q
GROUP BY Q.Year, Q.[MANAGER-NAME]
HAVING (((Q.[MANAGER-NAME])<>"UNDISCLOSED") And
((Q.Year)=Forms!frmInvisible!txtReportYear))
ORDER BY Sum(Q.ManagerFees) DESC;
query that is ordered based on the descending value of a SumOf field? Code
that fails appears below.
TIA
---------------------------------
SELECT TOP 10 Q.Year, Q.[MANAGER-NAME], Sum(Q.ManagerFees) AS AllProducts,
(SELECT Count(*) FROM [qryMktShare-Domestic-LeagueTableMaster] Q1 WHERE
Q1.[MANAGER-NAME] = Q.[MANAGER-NAME] AND Sum(Q1.ManagerFees)<
Sum(Q.AllProducts)) AS Rank
FROM [qryMktShare-Domestic-LeagueTableMaster] AS Q
GROUP BY Q.Year, Q.[MANAGER-NAME]
HAVING (((Q.[MANAGER-NAME])<>"UNDISCLOSED") And
((Q.Year)=Forms!frmInvisible!txtReportYear))
ORDER BY Sum(Q.ManagerFees) DESC;