Why isn't there a way to reference column aliases in the columns list or
where clause?
Example:
select if(score50,-5,0) failing_score, if(score50, 1, 0) passing_score,
attendance/totaldays Percent_Attendance ,
failing_score/passing_score*percent_attendance
from schoolwork
(There is no logic
Why isn't there a way to reference column aliases in the columns list or
where clause?
http://dev.mysql.com/doc/refman/5.0/en/problems-with-alias.html
That's why.
--
Scott Noyes
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
On 11/7/05, mos wrote:
Why isn't there a way to reference column aliases in the columns list or
where clause?
Because the SQL standad says so. See chapter 7 of ISO/IEC 9075-2:2003.
select if(score50,-5,0) failing_score, if(score50, 1, 0) passing_score,
attendance/totaldays
Jochem van Dieten [EMAIL PROTECTED] wrote on 11/07/2005 03:32:25 PM:
On 11/7/05, mos wrote:
Why isn't there a way to reference column aliases in the columns list
or
where clause?
Because the SQL standad says so. See chapter 7 of ISO/IEC 9075-2:2003.
select if(score50,-5,0)