I need help on creating updating SQL script
TableA
colA colB colC colD colE
a b x g z
b c d g h
c d f g v
v f f g f
d a q o a
TableB
colA colB colC colD colE
a b x y a
b c d g b
c d f g c
d e s g d
v f f g e
I need TableB.colE to update to TableA.colE where TableB.colD = TableA.colD
Result shall be
TableA
colA colB colC colD colE
a b x g b
b c d g c
c d f g d
v f f g e
d a q o a
I have tried using
UPDATE TABLEA SET(TABLEA.COLE=TABLEB.COLE) WHERE TABLEA.COLD = TABLEB.COLD
it doesn’t work.
UPDATE TABLEA SET TABLEA.COLE=TABLEB.COLE from TABLEB WHERE TABLEA.COLD = TABLEB.COLDYou have missed to specify the second table name TABLEB in from clause. Try this.