On 10/10/2011 07:43, Dimitry Sibiryakov wrote:
> 10.10.2011 12:36, Adriano dos Santos Fernandes wrote:
>> Wrong reason, as Oracle doesn't support external triggers.
>     Oracle SQL Reference for version 10 has other opinion:
>
> ---------- quote -------------------------------
> CREATE TRIGGER salary_check
> BEFORE INSERT OR UPDATE OF salary, job_id ON employees
> FOR EACH ROW
> WHEN (new.job_id<>  'AD_VP')
> CALL check_sal(:new.job_id, :new.salary, :new.last_name)
>
> The procedure check_sal could be implemented in PL/SQL, C, or Java.
> ---------- quote end ---------------------------
>
You said it, *procedure*. It's fake external trigger.

Nothing really different than:
FOR EACH ROW
BEGIN
     IF (new.job_id <> 'AD_VP') THEN
         check_sal(:new.job_id, :new.salary, :new.last_name);
     END IF;
END;

So my point, trigger's WHEN clause is not a special thing for external 
calls in Oracle.


Adriano


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to