Re: Syntax error? What syntax error??
Posted in 1997
In article <EAv3rK.Js0@nonexistent.com>, Jacob Salomon <jake@apparel.net> wrote: <snip> >Now, I try it on a table in the live database, but this time I am >propagating several columns: >update foggy_stor > set (country, old_acct, cust_type, call_alloc, ship_lead) > = (select country, old_acct, cust_type, call_alloc, ship_lead > from customer c > where c.customer = foggy_stor.customer); > >Aside from the number of columns involved, the only difference is the >parentheses around the list of columns to be updated. And this is a >syntax requirement. Anyway, when I run the above update, I get this >error output: > >update foggy_stor > set (country, old_acct, cust_type, call_alloc, ship_lead) > = (select country, old_acct, cust_type, call_alloc, ship_lead ># ^ ># 201: A syntax error has occurred. ># > from customer c > where c.customer = foggy_stor.customer); > You will be flabbergasted to know that all you need to do is to change the single bracket before "select country" to a double bracket with a corresponding one at the end. (I love informix! - or is this some ansi-sql standard?) ----------------------- Rudy Fernandes GIC, Kuwait OL 7.20UC4, 4GL 6.04UC1 -----------------------