Re: update / subquery

2005-05-29 Thread Jochem van Dieten
On 5/29/05, Lieven De Keyzer wrote: From: Chris Lieven De Keyzer wrote: UPDATE account SET role_id = (SELECT role_id FROM role WHERE rolename = admin) WHERE username = test This gives me an: ERROR 1064 (0): You have an error in your SQL syntax. Check the manual that corresponds to

Re: update / subquery

2005-05-28 Thread Lieven De Keyzer
I've got mysql-4.1.10 installed. From: Chris [EMAIL PROTECTED] To: mysql@lists.mysql.com Subject: Re: udpate / subquery Date: Sat, 28 May 2005 22:31:19 -0700 Syntax looks fine to me. Sub-queries are only supported in 4.1.x+ , I'm guessing that's your problem. Chris Lieven De Keyzer wrote:

Re: Re: MySQL update subquery replacement

2002-07-23 Thread Egor Egorov
Steve, Tuesday, July 23, 2002, 7:36:39 AM, you wrote: S Can anyone tell me how do achieve the following in MySQL: S Update oitems S SET Pstatus = SELECT product.Pstatus from products S WHERE oitems.Pstatus not like %Printed% SAND oitems.ProdCode=products.Code S i.e. I need

Re: MySQL update subquery replacement

2002-07-22 Thread Steve
Can anyone tell me how do achieve the following in MySQL: Update oitems SET Pstatus = SELECT product.Pstatus from products WHERE oitems.Pstatus not like %Printed% AND oitems.ProdCode=products.Code i.e. I need to update all order item status flields that have not been

MySQL update subquery replacement

2002-07-22 Thread Steve Lane
OOps somehow my last request got re: on the Subject Can anyone tell me how do achieve the following in MySQL: Update oitems SET Pstatus = SELECT product.Pstatus from products WHERE oitems.Pstatus not like %Printed% AND oitems.ProdCode=products.Code i.e. I need to update all