Cursor Attribute %NOTFOUND
955975Aug 15 2012 — edited Aug 15 2012Sorry guys, this is my first post.
Everything appears to work great except....
The cursor attribute %NOTFOUND is not working in my code.
If I comment out the check for the cursor not found, the update works.
What have I done wrong.
BEGIN
FOR upd_mrch_rec IN CUR_MRCH
LOOP
UPDATE pdt.tmp_pdt_mrch_upd SET mrch_fk=upd_mrch_rec.org_mrch_fk
WHERE merch_nbr=upd_mrch_rec.mcrh_nbr;
-- IF CUR_MRCH%NOTFOUND THEN
UPDATE pdt.tmp_pdt_mrch_upd SET sts_cde=p_mrch_err_cde,sts_msg=p_mrch_err_msg;
-- WHERE org_mrch_fk=NULL;
-- END IF;
END LOOP;