At 16:23 -0800 12/15/04, Kevin A. Burton wrote:
Not sure if this is a bug... probably should be.
On 4.1.18 I can run:
4.1.18?
I assume you mean 4.0.18. Anyway, what you describe is according to
the documentation:
http://dev.mysql.com/doc/mysql/en/UNION.html
(SELECT * FROM FOO WHERE ID = 1)
UNION
(SELECT * FROM FOO WHERE ID = 2)
ORDER BY FOO.COL_A
Which will work just fine
However when I use this query on 4.1.7 I get
ERROR 1250 (42000): Table 'ARTICLE' from one of the SELECTs cannot
be used in global ORDER clause
I have to rewrite it to use:
(SELECT * FROM FOO WHERE ID = 1)
UNION
(SELECT * FROM FOO WHERE ID = 2)
ORDER BY COL_A
.. see the change in the ORDER BY... I can't call if FOO.COL_A I
have to call it COL_A
Kevin
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]