ERROR 1066: Not unique table/alias: "A"
ERROR 1066: Not unique table/alias: "A"
am 15.10.2003 00:23:27 von roger.e.larsson
Hello!
Following insert works on Oracle 7,8,9 and MS SQLServer 6,7,2000 (without
'TYPE=INNODB').
Is it posible to get MySQL to understand this insert also?
Version used:
D:\mysql\bin>mysqld-max-nt.exe -V
mysqld-max-nt.exe Ver 4.1.0-alpha-max-nt for NT on i32
---
mysql> DROP TABLE IF EXISTS A;
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE TABLE A (a1 INT) TYPE=INNODB;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO A (a1) VALUES (1);
Query OK, 1 row affected (0.00 sec)
mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT * FROM A;
+------+
| a1 |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql> INSERT INTO A (a1) SELECT max(a1)+1 FROM A;
ERROR 1066: Not unique table/alias: 'A'
---
Regards/
Roger Larsson
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
Re: ERROR 1066: Not unique table/alias: "A"
am 15.10.2003 12:54:09 von Alexander Keremidarski
Hello,
Roger Larsson (RRLN) wrote:
> Hello!
> mysqld-max-nt.exe Ver 4.1.0-alpha-max-nt for NT on i32
> mysql> INSERT INTO A (a1) SELECT max(a1)+1 FROM A;
> ERROR 1066: Not unique table/alias: 'A'
This feature were recently implemented in 4.0.15 and merged to 4.1 tree. This
happened after 4.1.0 was released.
4.1.1 which will be released soon has it.
---
>
> Regards/
> Roger Larsson
Best regards
--
Are you MySQL certified? -> http://www.mysql.com/certification
For technical support contracts, visit https://order.mysql.com/?ref=msal
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
Re: ERROR 1066: Not unique table/alias: "A"
am 15.10.2003 13:30:02 von Sergei Golubchik
Hi!
On Oct 15, Roger Larsson (RRLN) wrote:
> Hello!
>
> Following insert works on Oracle 7,8,9 and MS SQLServer 6,7,2000 (without
> 'TYPE=INNODB').
> Is it posible to get MySQL to understand this insert also?
Yes!
Actually, MySQL understands it now, in the 4.1 development tree.
It was implemented after 4.1.0 release.
So your query will work in 4.1.1.
> Version used:
> D:\mysql\bin>mysqld-max-nt.exe -V
> mysqld-max-nt.exe Ver 4.1.0-alpha-max-nt for NT on i32
>
> ---
> mysql> DROP TABLE IF EXISTS A;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> CREATE TABLE A (a1 INT) TYPE=INNODB;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> INSERT INTO A (a1) VALUES (1);
> Query OK, 1 row affected (0.00 sec)
>
> mysql> COMMIT;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> SELECT * FROM A;
> +------+
> | a1 |
> +------+
> | 1 |
> +------+
> 1 row in set (0.00 sec)
>
> mysql> INSERT INTO A (a1) SELECT max(a1)+1 FROM A;
> ERROR 1066: Not unique table/alias: 'A'
> ---
>
> Regards/
> Roger Larsson
>
Regards,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
Re: ERROR 1066: Not unique table/alias: "A"
am 15.10.2003 18:45:17 von Sinisa Milivojevic
Roger Larsson (RRLN) writes:
> Hello!
>
> Following insert works on Oracle 7,8,9 and MS SQLServer 6,7,2000 (without
> 'TYPE=INNODB').
> Is it posible to get MySQL to understand this insert also?
>
> Version used:
> D:\mysql\bin>mysqld-max-nt.exe -V
> mysqld-max-nt.exe Ver 4.1.0-alpha-max-nt for NT on i32
>
> ---
> mysql> DROP TABLE IF EXISTS A;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> CREATE TABLE A (a1 INT) TYPE=INNODB;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> INSERT INTO A (a1) VALUES (1);
> Query OK, 1 row affected (0.00 sec)
>
> mysql> COMMIT;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> SELECT * FROM A;
> +------+
> | a1 |
> +------+
> | 1 |
> +------+
> 1 row in set (0.00 sec)
>
> mysql> INSERT INTO A (a1) SELECT max(a1)+1 FROM A;
> ERROR 1066: Not unique table/alias: 'A'
> ---
>
> Regards/
> Roger Larsson
>
>
>
Already fixed in 4.1.1 to be out in few weeks.
--
Sincerely,
--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org