Cuman kurang begin pak.
 
LOOP
open allResult
fetch allResult into resultrecord;
exit when allResult%NOTFOUND;

EXECUTE IMMEDIATE SQLstmt;
begin
update smsapp.PERFORMANCE set END_TIME = sysdate()
where smsapp.PERFORMANCE.ID = perfID;
 commit;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;

END LOOP;


 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of indra syafruddin
Sent: Wednesday, February 28, 2007 9:59 AM
To: [email protected]
Subject: [indo-oracle] exception handling
 
Ada yang tau bagaimana caranya saya meneruskan loop di PL/SQL walaupun
terjadi exception :
saya coba menjalankan script :

LOOP
open allResult
fetch allResult into resultrecord;
exit when allResult%NOTFOUND;

EXECUTE IMMEDIATE SQLstmt;
update smsapp.PERFORMANCE set END_TIME = sysdate()
where smsapp.PERFORMANCE.ID = perfID;
commit;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;

END LOOP;

harusnya seperti itu, tapi keluar error :
PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the
following:

begin case declare end exit for goto if loop mod null pragma
raise return select update while with <an identif

kalau block exception nya dibuang, procedurenya jalan lancar, tapi
keluar
sendiri kalau terjadi exception

Terima kasih.

[Non-text portions of this message have been removed]
 


[Non-text portions of this message have been removed]

Kirim email ke