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

Home -> Community -> Usenet -> c.d.o.tools -> Re: What's wrong with this trigger?

Re: What's wrong with this trigger?

From: <tigrans_at_my-deja.com>
Date: Wed, 16 Aug 2000 04:57:29 GMT
Message-ID: <8nd6vh$lb3$1@nnrp1.deja.com>

Your trigger must be

   IF :new.status_yn = 'Y' THEN
     :new. pic_ob = empty_blob();
   END IF; In article <8ncnfh$s2s$1_at_newsmaster.cc.columbia.edu>,   "Helen" <helen_kuo_at_us.sina.com> wrote:
> I could create this trigger, but it didn't do what I wanted. Thanks for your
> input.
>
> CREATE OR REPLACE TRIGGER pic_trg_aiur BEFORE INSERT OR UPDATE
> OF status_yn ON picture
> FOR EACH ROW
>
> BEGIN
> IF :new.status_yn = 'Y' THEN
> UPDATE picture
> SET pic_ob = empty_blob()
> WHERE pic_id = :new.pic_id;
> END IF;
> EXCEPTION
> ..
> END;
> /
>
> H
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Aug 15 2000 - 23:57:29 CDT

Original text of this message

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