Re: Update Syntax Question
Posted in 1995
Peter Harris (phr@fmsc.com.au) wrote: : update d_cat set (code1, code2, code3, code4) = : ((select code1, code2, code3, code4 from u_cat : where state = d_cat.state : and county = d_cat.county)) : where state = (select state from u_cat) : and county = (select county from u_cat); ^^^ This will not work unless there is only one row in table "u_cat". You'll get an error message saying something like "subquery returned more than one row". Replace the "=" with "in" and you should be alright. Regards, Richard -- +----------------------------+-------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3421 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | | +----------------------------+-------------------------------------------+