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: Yong <yk-park_at_fkl.fujitsu.co.kr>
Date: Wed, 16 Aug 2000 14:06:49 +0900
Message-ID: <8nd7gn$23h$1@news.nuri.net>

I think below trigger can do work when inserting. but on updating, ":new.pic_id" in where statemnet is not fixed. thus nothing happen.

so you had better divide this trigger.

if inserting then




else


end if;

Helen <helen_kuo_at_us.sina.com>ÀÌ(°¡) ¾Æ·¡ ¸Þ½ÃÁö¸¦ news:8ncnfh$s2s$1_at_newsmaster.cc.columbia.edu¿¡ °Ô½ÃÇÏ¿´½À´Ï´Ù.
> 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
>
>
Received on Wed Aug 16 2000 - 00:06:49 CDT

Original text of this message

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