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%" S> AND oitems.ProdCode=products.Code S> i.e. I need to update all order item status flields that have not been S> printed, with the matching product's current status If you are using 4.0.2 you can use multi-table updates otherwise you can't do it with single SQL statement. Note multi-table updates are only beta. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php