Can't reference column aliases

2005-11-07 Thread mos
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

Re: Can't reference column aliases

2005-11-07 Thread Scott Noyes
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:

Re: Can't reference column aliases

2005-11-07 Thread Jochem van Dieten
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

Re: Can't reference column aliases

2005-11-07 Thread SGreen
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)