Re: WHERE and 'AS' problem
On 31 Jan, 10:29, Geoff <foooooo...@hotmail.com> wrote:
> SELECT * , DATE_ADD( test_equipment_cal_date, INTERVAL
> test_equipment_cal_days DAY ) AS test_equipment_expire_date
> FROM `test_equipment`
> WHERE test_equipment_expire_date < '2008-01-31'
>
> #1054 - Unknown column 'test_equipment_expire_date' in 'where clause'
>
> so, i simply can't do that ???
> how am i supposed to do such a thing ?
Put it in the HAVING clause instead
|