Re: Update question
Posted in 1996
Boris Niyazov — — source: Informix-list mailing list archive (1991-1998)
If you have 4gl:
declare c_upd cursor for
select colA, colB from B
foreach c_upd into store_colA, store_colB
update A set colB = store_colB
where A.colA = store_colA
end foreach
If do not have 4gl, the following should work:
update A set colB = (select B.colB from B
where B.colA = A.colA)
-Boris
boris@hal2000.law.columbia.edu
>I'm trying to update colB from table A with the corresponding values of colB
>from table B where A.colA = B.colA
>
>Table A Table B
>colA colA
>colB colB
>
>How do I do this in a SQL statement?
>
--