-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 3:34 PM
To: [EMAIL PROTECTED]
Subject: ezmlm response
Hi! This is the ezmlm program. I'm managing the
[EMAIL PROTECTED] mailing list.
This is a generic help message. The message I received wasn't sent to
any of my command addresses.
--- Administrative commands for the mysql list ---
I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:
To subscribe to the list, send a message to:
<[EMAIL PROTECTED]>
To remove your address from the list, send a message to the address
Description:
The SELECT statement fails to recognize that an alias (mycol) was set for a
column. Note the column name is created from a table alias (c1)
mysql> select c1.id as mycol from colors c1 right join colors c2 on
c1.color=c2.color AND c1.id != c2.id where mycol is not null;
ERROR 1054: Unknown column 'mycol' in 'where clause'
mysql> describe colors;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| color | char(10) | YES | | NULL | |
+-------+----------+------+-----+---------+-------+
2 rows in set (0.36 sec)
mysql> select * from colors;
+------+--------+
| id | color |
+------+--------+
| 1 | red |
| 1 | orange |
| 1 | yellow |
| 2 | blue |
| 2 | green |
| 2 | purple |
| 3 | violet |
| 3 | pink |
| 3 | blue |
+------+--------+
9 rows in set (0.00 sec)
How-To-Repeat:
see problem description
Fix:
none
Synopsis: SELECT Does Not Recognize Column Alias
Submitter-Id: <submitter ID>
Originator: Richard Emery
Organization: Excel Communications
MySQL support: none
Severity: serious
Priority: medium
Category: mysql client
Class: sw-bug
Release: mysql-3.23.38
Exectutable: mysqld-nt-max
Environment: Pentium 3
System: Win20
Compiler: Binary download from MYSQL AB website
Architecture: intel
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php