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 -> Re: help!!!

Re: help!!!

From: David Pattinson <david_at_addease.com.au>
Date: Thu, 03 Jun 1999 16:54:42 +1000
Message-ID: <375626B1.F0374F64@addease.com.au>


Suggest you check for the NO_DATA_FOUND exception as below:

Chen Li wrote:

> Hi, All:
>
> I am writing a before insert trigger. I want to make a comparison
> between the new record and
> others which are already in the database. For example: the name of my
> table is myt, when I

BEGIN
> select *** from myt
> into *** where a = :new.a and b=:new.b;

EXCEPTION
    WHEN NO_DATA_FOUND
        --do whatever...
    WHEN OTHERS
        RAISE;
END;
>
> It is obviously that there is no data in the database at first, so no
> data can be selected and even
> when there is data in the database, sometimes no data fulfill the select
> criteria so no data is selected, the result is the trigger does not
> work. How to handle such situation? Thanks.
>
> Simon
Received on Thu Jun 03 1999 - 01:54:42 CDT

Original text of this message

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