Jesse wrote:
COALESCE(CampCount.Cnt,0) + COALESCE(CounselorCount.Cnt,0) as GT
Duuuh. Why didn't I think of that. What is MySQL's issue with
referring to the variables ("As" assignments, whatever you want to
call them)? I've had issues like this in situations like this one,
when trying to use them in the ORDER BY clause, and other places.
They simply don't 'exist' at that point in time. All of the rows are
read at one point in time (according to a WHERE clause if applicable),
then the expressions within the column lists are done, then grouping,
order by etc., and finally HAVING clauses are done (where one can use a
column alias, when not available within a WHERE clause).
However, you should be able to use them in an ORDER BY - as they do
exist at that point - so I'm not sure that issue would have been related
to this.
Best regards
Mark
--
Mark Leith, Support Engineer
MySQL AB, Worcester, England, www.mysql.com
Are you MySQL certified? www.mysql.com/certification
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]