Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can a Trigger call StoredProc(
Old and New let you look at EACH column in the record rather
than the record.
For instance if I have table TABA with col1, col2, col3
:new.col1 is the value AFTER the insert or update and null
for a delete
while :old.col1 is the value before the update or delete and
is null for an insert. likewise :new.col2, :new.col3 and
:old.col2, :old.col3
Help any?
Becca
> This is a multi-part message in MIME format.
> --------------9AA1C9108BA0B1B1A5DAE914
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hi,
>
> What is the type of :new and :old records of a trigger ?
> Is there any possibility
> - to pass assign the :new variable in a trigger to
procedures
> - or assign its value to another variable ?
>
> I want to do something like that:
> PROCEDURE StoredProc ( alt IN OUT test_c%ROWTYPE, neu IN OUT
> test_c%ROWTYPE ) IS
> BEGIN
> NULL;
> END StoredProc;
>
> CREATE OR REPLACE TRIGGER boss
> AFTER INSERT OR UPDATE OR DELETE ON test_c
> FOR EACH ROW
> -- REFERENCING old as old_rec
> BEGIN
> StoredProc ( :old, :new );
> END;
>
> Thank you very much
>
> --------------9AA1C9108BA0B1B1A5DAE914
> Content-Type: text/x-vcard; charset=us-ascii;
> name="Torsten.Reichert.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for Torsten.Reichert_at_gmx.net
> Content-Disposition: attachment;
> filename="Torsten.Reichert.vcf"
>
> begin:vcard
> n:Reichert;Torsten
> tel;cell:0179 / 2972481
> tel;fax:06236 / 41051
> tel;home:06236 / 41045
> tel;work:06236 / 41045
> x-mozilla-html:FALSE
> url:home.t-online/home/treichert
> org:EDV-Büro
> adr:;;Lerchenstrasse 76;Waldsee;Palate;D 67165;Germany
> version:2.1
> email;internet:Torsten.Reicher_at_gmx.net
> title:Dipl.Wi.inf.
> end:vcard
>
> --------------9AA1C9108BA0B1B1A5DAE914--
>
>
>
--
This answer is courtesy of QuestionExchange.com
http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=8228&cus_id=USENET&qtn_id=7362
Received on Mon Dec 13 1999 - 09:42:17 CST