I can't seem to get the following SQL statement with the ORDER BY clause to
work. It does work if I order by any of the fields in the SELECT part of the
statement but not if it is the field in the TRANSFORM part.
The posted code is from the Immediate Pane:
TRANSFORM Format(Sum([TEMPTABLEA].ELEC_EUI),'#,###.00') AS EUI SELECT
BUILDING_TYPE As Type, [TEMPTABLEA].BUILDING_TYPE_DESC As Description FROM
[TEMPTABLEA] GROUP BY [TEMPTABLEA].BUILDING_TYPE, [TEMPTABLEA].
BUILDING_TYPE_DESC ORDER BY Format(Sum([TEMPTABLEA].ELEC_EUI),'#,###.00') ASC
PIVOT [TEMPTABLEA].CITY
The error is that I can't have an aggregate function in the ORDER BY Clause.
I tried using the alias, EUI, but that doesn't work either. So how do I
order by this.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200607/1