On Dec 17, 12:27 am, Carl Von Stetten <[email protected]> wrote:
> I misspoke.  I meant that you cannot use an alias that refers to an
> aggregate function value (like count, max, min, etc.) in the order by
> clause.  If you merely provide an alias on a database field (i.e.:
> myfield AS mynewfield), you can use that in the order by clause.

But hang on.  In the example the alias IS on an aggregate function:

<cfquery name="allUsersLogins" dbtype="query">
 select loggins, count(*) as total from allUsers where account_active
= 1
Group By loggins
Order By total Desc
</cfquery>


I've just fixed my SQL Server install and verified this runs fine.

--
Adam

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 official manual: http://www.openbluedragon.org/manual/
 Ready2Run CFML http://www.openbluedragon.org/openbdjam/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to