RE: Does Update allow for aliases?

2007-01-17 Thread Jonathan Langevin
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

Re: Multiple table updates (Was: Does Update allow for aliases)

2007-01-11 Thread Brent Baisley
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

Re: Multiple table updates (Was: Does Update allow for aliases)

2007-01-11 Thread Brent Baisley
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

Does Update allow for aliases?

2007-01-10 Thread Richard Reina
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

Re: Does Update allow for aliases?

2007-01-10 Thread Chris White
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

Re: Does Update allow for aliases?

2007-01-10 Thread Nils Meyer
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

Multiple table updates (Was: Does Update allow for aliases)

2007-01-10 Thread Chris White
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

RE: Does Update allow for aliases?

2007-01-10 Thread Jonathan Langevin
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

Re: Does Update allow for aliases?

2007-01-10 Thread Shawn Green
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

Re: Does Update allow for aliases?

2007-01-10 Thread ViSolve DB Team
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