Charlie,

If QofQ follows the same rules as SQL Server, you cannot reference an alias in the order by clause. Try changing the last line to:

Order By count(*) desc

HTH,
Carl

On 12/13/2010 5:15 PM, Skellington wrote:
Hello,
I just wanted to make sure I was not doing something wrong here. When
I run the following code all of it work except for the "Order By total
Desc". The order by never happens.

Is this a know issue?

Thanks,
Charlie

<!--- First Query --->
<cfquery name="allUsers" datasource="#APPLICATION.dbSource#">
  select * from users
</cfquery>

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


--
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