On Wednesday 02 April 2003 22:36, Daevid Vincent wrote:
> so then the next obvious question to ask is... is this just not
> implemented yet, or is it not even on the radar as a 'feature'?
It'a behaviour. You can refer in the HAVING, ORDER BY and GROUP BY, but you
can't in the select list and WHERE part.
> Out of curiosity, do other SQL implementations (RDBMS) allow this
> syntax?
Seems in Access it's allowed, but I'm not sure.
> On Wed, 2003-04-02 at 08:06, Egor Egorov wrote:
> > On Wednesday 02 April 2003 04:04, Daevid Vincent wrote:
> > > Is this a bug or just not implemented in 3.23.56-Max?
> > >
> > > mysql> SELECT alarm_notes, DATE_FORMAT(alarm_date,'%m/%d/%y %h:%i %p')
> > > AS alarm_date_format, IFNULL(CONCAT(contact_fname, ' ', alarm_date),
> > > alarm_date_format) AS contact_name, contact_email, contact_phone FROM
> > > alarm_table LEFT JOIN contact_table ON alarm_contact_table_id =
> > > contact_id WHERE alarm_rep_table_id = '1' ORDER BY alarm_date;
> > > ERROR 1054: Unknown column 'alarm_date_format' in 'field list'
> >
> > [skip]
> >
> > It's not a bug. You can't reference column aliases in the select list.
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ Egor.Egorov@stripped
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com