I search an update-command, which update me only some records (more than one row) in a table. The update Information comes from an other table.
Unfortunately it updates all 3500 records instead of only 603 records.
Here is the update/select. What is wrong:
update Z_VERTRAGSDATEN_HIST HIST
set
(HIST.VERHI_BISDAT) =
(select
UPDA.VERHI_BISDAT
from
Z_VERTRAGSDATEN_HIST HIST
, Z_VERTRAGSDATEN_UPDATE UPDA
where
HIST.VERHI_VER_ID = UPDA.VERHI_VER_ID
and
HIST.VERHI_BISDAT != UPDA.VERHI_BISDAT
)
;
commit;
Best Answer
I friend told me the solution: