Re: Update error on ver 3.23, works on ver 5.0
Hi, Tim Johnson wrote: Hi: I use 5.0.38 on my ubuntu desktop and I have to work with ver 3.23.56 on a solaris-based server. The following update query: UPDATE wine_list,FRED SET wine_list.wine_ID=FRED.WMJ_ID WHERE wine_list.wine_ID=FRED.wine_ID; works on 5.038, but on 3.23.56 I get the following: ERROR 1064 (0): You have an error in your SQL syntax near 'FRED SET wine_list.wine_ID=FRED.WMJ_ID WHERE wine_list.wine_ID=FRED.wine_ID' at line 1 Any ideas on how to make it work? Pointers to error codes would be helpful, also. Multi-table updates aren't supported until... um... 4.0.8 I think. Can't quite remember. I think the best way is to do an INSERT..SELECT into a temp table, then INSERT..SELECT from the temp table back to where you want the data to live. Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Update error on ver 3.23, works on ver 5.0
On Thursday 02 August 2007, Tim Johnson wrote: Hi: I use 5.0.38 on my ubuntu desktop and I have to work with ver 3.23.56 on a solaris-based server. The following update query: UPDATE wine_list,FRED SET wine_list.wine_ID=FRED.WMJ_ID WHERE wine_list.wine_ID=FRED.wine_ID; works on 5.038, but on 3.23.56 I get the following: ERROR 1064 (0): You have an error in your SQL syntax near 'FRED SET wine_list.wine_ID=FRED.WMJ_ID WHERE wine_list.wine_ID=FRED.wine_ID' at line :-) Now I know why I upgraded from 3~ - it looks like the ability to update a table with values from another table was added at version 4.04. I could dump the table, run the update on my desktop and re-install, *but* time is of the essence, 'cuz an update of wine_list on the server while I'm operating on it on my desktop could cause some grief... any other ideas? thanks tim -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]