drop table app_error_log;
drop table number_table;
create table app_error_log (c_sqlcode number, c_sqlerrm varchar2(4000));
create table number_table (n number);
declare
v_sqlcode number;
v_sqlerrm varchar2(4000);
begin for f in 1..10 loop
begin
insert into number_table values ( 'a ');
exception
when others then
v_sqlcode := sqlcode;
v_sqlerrm := sqlerrm;
insert into app_error_log values (v_sqlcode, v_sqlerrm);
commit;
end;
end loop; end;
/
Jurijs
+371 9268222 (+2 GMT)
============================================
Thank you for teaching me.
http://otn.oracle.com/ocm/jvelikanovs.html
Raj Jamadagni <rjamya@(protected) >
Sent by: oracle-l-bounce@(protected)
05.08.2004 14:24
Please respond to oracle-l
To: oracle-l@(protected)
cc:
Subject: Re: standards
I use it on a regular basis in certain code of mine (on production
database that runs 24x7) when I
DON 'T want the exception to kill the processing.
Flogging ... dunno, but if you know what the hell you are doing then it is
a mighty fine syntax.
How would you otherwise continue in a loop when processing remaining
iterations is of paramount
importance than breaking over an ant in the middle of the road??
Over here, we discourage that practice too, but then again there are some
exceptions. And yes I
did notice the smiley.
Raj
--- david wendelken <davewendelken@(protected) > wrote:
>
> How about:
>
> PL/SQL Programmers who use exception blocks like this will be flogged,
then fired from their
> job.
>
> EXCEPTION
> WHEN OTHERS THEN
> NULL;
> END;
>
> :)
=====
Best Regards
Raj
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
select mandatory_disclaimer from company_requirements;
__ ____ ____ ____ ____ ____ ______
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --