|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: 4.1 and unions
From: Jason Pyeron (jpyeron
pdinc.us)
Date: Thu Aug 04 2005 - 12:22:58 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
mysql> select * from files where id < 10 union (select * from files where id >20 and id <30);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
mysql> select * from files where id < 10 union select * from files where id >20 and id <30;
+----+---------+---------+---------------+-------+-------+------+
| id | pathref | version | mdate | ddate | size | md5 |
+----+---------+---------+---------------+-------+-------+------+
| 1 | 19 | 0 | 1094523040217 | NULL | 9 | NULL |
| 2 | 21 | 0 | 1120090156726 | NULL | 45 | NULL |
| 3 | 22 | 0 | 1120089642527 | NULL | 14 | NULL |
| 4 | 23 | 0 | 1120089642527 | NULL | 28 | NULL |
| 5 | 25 | 0 | 1120781223174 | NULL | 6171 | NULL |
| 6 | 26 | 0 | 1120781223204 | NULL | 5511 | NULL |
| 7 | 31 | 0 | 1120781215964 | NULL | 13854 | NULL |
| 8 | 33 | 0 | 1120781222173 | NULL | 6236 | NULL |
| 9 | 35 | 0 | 1120781216184 | NULL | 15036 | NULL |
| 21 | 48 | 0 | 1120781222753 | NULL | 27663 | NULL |
| 22 | 49 | 0 | 1120781222723 | NULL | 6477 | NULL |
| 23 | 50 | 0 | 1120781222203 | NULL | 6397 | NULL |
| 24 | 51 | 0 | 1120781222663 | NULL | 12968 | NULL |
| 25 | 52 | 0 | 1120781222713 | NULL | 8904 | NULL |
| 26 | 53 | 0 | 1120781222693 | NULL | 6397 | NULL |
| 27 | 54 | 0 | 1120781222673 | NULL | 6397 | NULL |
| 28 | 55 | 0 | 1120781222653 | NULL | 6337 | NULL |
| 29 | 56 | 0 | 1120781222623 | NULL | 6447 | NULL |
+----+---------+---------+---------------+-------+-------+------+
18 rows in set (0.03 sec)
Server version: 4.1.13-nt
On Thu, 4 Aug 2005, Mike Johnson wrote:
> Hi all,
>
> Is there anyone using version 4.1 that can verify or refute the claim
> posted at the bottom of the upgrade notes here?
>
> http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html
>
> The user claims that UNION statements with parentheses are broken in
> 4.1. That is, 'SELECT * FROM table1 UNION (SELECT * FROM table2)' or
> something similar.
>
> We're looking to upgrade but find te claim a bit dubious as there's no
> follow-up, no other mention, and I can't recall seeing anything on the
> list about it. Can anyone perform a quick test or verify one way or the
> other? I'd be much obliged.
>
> Thanks!
>
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager 7 West 24th Street #100 -
- +1 (443) 921-0381 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and
notify the sender immediately. Any other use of the email by you
is prohibited.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]