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

Home -> Community -> Usenet -> c.d.o.misc -> Problem with PL/SQL code

Problem with PL/SQL code

From: Gillian Murugappan <gmuruga_at_entergy.com>
Date: 1998/03/05
Message-ID: <6dmg5k$l6f@CCTuNews.entergy.com>#1/1

Following is the code I am trying to execute, but something is wrong. Could someone help with the syntax??

CREATE TRIGGER oraap.ap_invoice_ad

       AFTER DELETE ON ap.ap_invoices
       FOR EACH ROW
       REFERENCING OLD AS ap.ap_invoices
                   NEW AS oraap.ap_invoice_audit
       FOR EACH ROW
       BEGIN
          INSERT INTO oraap.ap_invoice_audit
             

(invoice_id,invoice_num,vendor_id,attribute1,delete_date,user_id)
VALUES

(old:invoice_id,old:invoice_num,old:vendor_id,old:attribute1,SYDATE
(select osuser from V$session where audsid=userenv('sessionid')))

       END; The objective is to take the deleted rows from ap.ap_invoices and place them in a table oraap.ap_invoice_audit. I am using a SELECT statement to get the user_id.

Thanks in advance.
gmuruga_at_entergy.com Received on Thu Mar 05 1998 - 00:00:00 CST

Original text of this message

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