Update only some records 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;
I friend told me the solution:

update Z_VERTRAGSDATEN_HIST HIST
  set
    ( HIST.VERHI_BISDAT
    , HIST.VERHI_ENDE
    , HIST.VERHI_ZEITSTEMPEL
    )  =
    ( select
      UPDA.VERHI_BISDAT
      , UPDA.VERHI_ENDE
      , sysdate
     from
       Z_VERTRAGSDATEN_UPDATE UPDA
     where
       HIST.VERHI_VER_ID = UPDA.VERHI_VER_ID
     )
where 
  HIST.VERHI_VER_ID in 
  ( select 
      verhi_ver_id 
    from  
      Z_VERTRAGSDATEN_UPDATE
  )
;
commit;