Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cursor Attribute %NOTFOUND

955975Aug 15 2012 — edited Aug 15 2012
Sorry 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;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2012
Added on Aug 15 2012
6 comments
496 views