I concede to the MySQL engineer :-)
-Original Message-
From: Shawn Green [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 10, 2007 3:30 PM
To: Jonathan Langevin
Cc: Chris White; Richard Reina; mysql@lists.mysql.com
Subject: Re: Does Update allow for aliases?
Hi all,
Multi-table
The key part of the documentation for me was:
- Original Message -
From: Chris White [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, January 10, 2007 12:55 PM
Subject: Multiple table updates (Was: Does Update allow for aliases)
Reading the noted previous thread, I
with a multi-table update:
UPDATE x,y
SET x.YitemsExist=Y, y.XitemsExist=Y
WHERE x.id=y.id
- Original Message -
From: Chris White [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, January 10, 2007 12:55 PM
Subject: Multiple table updates (Was: Does Update allow for aliases
I am trying to update from one table to another but I get a syntax error when I
try:
UPDATE from maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE
o.ID=a.ID;
If update does not support aliases, is there another way to do this query? I
am usin V3.23.54. Any help would be
Richard Reina wrote:
I am trying to update from one table to another but I get a syntax error when I
try:
UPDATE from maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE o.ID=a.ID;
First off, it'd be best if possible (I know some cases prevent it) to
upgrade your server. The
Hi Richard,
Richard Reina wrote:
I am trying to update from one table to another but I get a syntax error when I
try:
UPDATE from maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE o.ID=a.ID;
If update does not support aliases, is there another way to do this query? I am usin
Reading the noted previous thread, I was curious as to updating multiple
tables. I read the MySQL docs, which mentions that you can do it:
Multiple-table syntax:
UPDATE [LOW_PRIORITY] [IGNORE] /|table_references|/
SET /|col_name1|/=/|expr1|/ [, /|col_name2|/=/|expr2|/ ...]
[WHERE
PROTECTED]
Sent: Wednesday, January 10, 2007 12:10 PM
To: Richard Reina
Cc: mysql@lists.mysql.com
Subject: Re: Does Update allow for aliases?
Richard Reina wrote:
I am trying to update from one table to another but I get a syntax
error when I try:
UPDATE from maindb.orders o, altdb.orders ao
Hi all,
Multi-table updates are not possible for versions older than 4.0.4.
(http://dev.mysql.com/doc/refman/4.1/en/update.html) so the operation is
not possible with your current version.
To be complete, though, each of you missed the second syntax error in
his statement
Jonathan
Update allow for aliases?
I am trying to update from one table to another but I get a syntax error
when I try:
UPDATE from maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE
o.ID=a.ID;
If update does not support aliases, is there another way to do this query?
I am usin V3.23.54. Any
10 matches
Mail list logo