Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Pl/sql question

RE: Pl/sql question

From: Thomas, Kevin <Kevin.Thomas_at_calanais.com>
Date: Mon, 28 Jan 2002 02:23:54 -0800
Message-ID: <F001.003FCB85.20020128012019@fatcity.com>

Hi Roland,

Best way to do this is just set some variables at the start of your code:

l_proc_start := sysdate;
l_proc_name := 'proc_name';

begin

  ...commands...

exception

  when <exception> then

        l_proc_end := sysdate;
        
      SELECT count(*)
        INTO l_ins_count
        FROM <table being inserted to>;

      INSERT INTO error_table
      ( proc_name

,proc_start
,proc_end
,proc_count
,proc_err
,proc_err_msg
) VALUES ( l_proc_name
,l_proc_start
,l_proc_end
,l_ins_count
,sqlcode
,sqlerrm
); COMMIT;

END; -----Original Message-----
Sent: 28 January 2002 08:40
To: Multiple recipients of list ORACLE-L

Hallo,

anyone who canhelp me with this?

I have PL/sql procedure and if something goes wrong I would like the following things to occur. Please help me with them

If some errors occur I want this to happen.

All these things I want to be inserted in a table. Give me a good example on how to write the code, please.

Thanks in advance

Roland

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Roland.Skoldblom_at_ica.se

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  INET: Kevin.Thomas_at_calanais.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Jan 28 2002 - 04:23:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US