SQL%ROWCOUNT value

From: Dereck L. Dietz <dietzdl_at_ameritech.net>
Date: Wed, 3 Dec 2008 09:51:26 -0500
Message-ID: <c0xZk.1491$jZ1.189@flpi144.ffdc.sbc.com>


Oracle 10g 10.2.0.3

In the code below can someone tell me exactly what SQL%ROWCOUNT is returning? Is it the number of rows processed or the number of rows updated?

I'm trying to clarify since the individual who runs this says it's updating correctly but is questioning the value returned by SQL%ROWCOUNT and the count of rows updated the individual runs afterward since they don't match.

  UPDATE clm_hdr a

     SET person_id = NVL((
                       SELECT b.person_id
                         FROM mbr.v_mbr b
                        WHERE b.mbr_key = '000' || 
SUBSTR(a.mbr_sys_key,1,11)

|| a.mbr_sex
||
SUBSTR(TO_CHAR(a.mbr_dob,'YYYYMMDD'),1,8)
||
SOUNDEX(TRIM(a.mbr_first_nm)) ),0)

   WHERE a.person_id = 0;

  v_hdr_cnt := SQL%ROWCOUNT; Received on Wed Dec 03 2008 - 08:51:26 CST

Original text of this message