Hi,
I'm having a bit of trouble with an update performed by a PL/SQL
routine that is updating more rows than it should be. Here's some of
the code:
Note that ZENT.APPID is NUMBER and ZENT.UCLS is VARCHAR(12)
OPEN APPAccessCursor;
LOOP
FETCH APPAccessCursor INTO appid,ucls;
EXIT WHEN APPAccessCursor%NOTFOUND;
UPDATE ZENT SET "ZENT"."ACCLEVEL"='N' WHERE "ZENT"."UCLS"=ucls AND
"ZENT"."APPKEY"=appid;
END LOOP;
CLOSE APPAccessCursor;
appid and ucls are populated successfully by the fetch but when the
update is performed, all rows matching appid are updated and the value
of ucls is essentially ignored. I've tried =, like, and in for the
ucls portion of the update statement and they all produce the same
result. What am I doing wrong?