Re: Update Syntax Question
Posted in 1995
From Tracy Nedd: * My current version of the statement is: * * update d_cat * set (code1, code2, code3, code4) = * (select #c#ode1, code2, code3, code4 * from u_cat * where * u_cat.state = d_cat.state and * u_cat.county = d_cat.county ) * * where d_cat.state = u_cat.state and * d_cat.county = u_cat.county Try the following: UPDATE d_cat SET (code1,code2,code3,code4) = ((SELECT code1,code2,code3,code4 FROM u_cat WHERE u_cat.state = d_cat.state AND u_cat.country = d_cat.country)); For some reason, you need a seperate set of parenthesis around the select statement. Also, you do not need the second where clause if you want to alter all records in the table. Robert Minter Data Systems Support \\\\\\_/// Senior Software Engineer A Client Technologies Company ( _ _ ) E-Mail: rob@dssmktg.com Tel: 714.771.0454 (| ^ |) #include <disclaimer.h> Fax: 714.771.3028 \\`-'/ De Colores - Emmaus OC-13 SURF'S UP \\_/