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(score<50,-

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(score<50,-5,0) failing_score, if(score>50, 1, 0) passing_score, > attendance/totaldays Percent_Atte

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:

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(score<50,-5,0) failing_score, if(score>50, 1, 0) passing_score, attendance/totaldays Percent_Attendance , failing_score/passing_score*percent_attendance from schoolwork (There is no logi