Re: SQL update statement
Posted in 1994
hassler@gshp9000.gradsch.ohio-state.edu (Dick Hassler) writes:
>In simplistic terms here is what I want to do:
> update file_a
> set file_a.a2 = "C"
> where file_a.a1 = file_b.a1
>I know that I have to do a correlated subquery but I can't figure
>out the right syntax. I thought that the example on page 131 of
>Jonathan Leffler's book would yield the answer but I haven't been
>able to convert his example to my specific case. His example is:
how about
update file_a
set file_a.a2 = "C"
where file_a1.a1 =
(
select file_b.a1
from file_b
where file_a.a1 = file_b.a1
)
I think this may do the trick.
--
-----------------------------------------------------------------
Eric Friedman Internet email: efried@netcom.com