Re: Is this a trigger bug?

From: S. Johnson <scjonson_at_fyiowa.infi.net>
Date: 1997/03/03
Message-ID: <331BA431.D4B_at_fyiowa.infi.net>#1/1


amit srivastava wrote:
>
> Can select stamements that do not reutrn any rows be used in a trigger?
> The trigger does not seem to exceute or die if it encounters
> a select stmt. without any records?
>
> .
> .
> .
>
> if updating then
> insert into temp_test values (' in updating');
> select distinct sr_active_dt
> into active_date
> from salesrep_hist
> where sr_id = :old.sr_id
> and to_char(sr_active_dt,'DDMMYY') = to_char(sysdate,'DDMMYY');
> insert into temp_test values (' past select');
> rem above stmt never gets exceuted!!!!!
>
> if (active_date is null) then

  The Select statement would generate a no_data_found exception. To trap for it use an exception when no_data_found or when others.

Steve J. Received on Mon Mar 03 1997 - 00:00:00 CET

Original text of this message