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: Two questions in Oracle...

Re: Two questions in Oracle...

From: <david.archer_at_chase.com>
Date: Fri, 27 Aug 1999 17:16:35 GMT
Message-ID: <7q6h5a$rh0$1@nnrp1.deja.com>


I see your first part has been answered. Let me have a stab at question 2.

Try the following:

IF Updating THEN
  IF :NEW.fieldA <> :OLD.fieldA THEN
    PRO1;
  END IF;
    PRO_ALL;
ELSIF Inserting THEN
  ...
ELSIF Deleting THEN
  ...
END IF; Good Luck,

David Archer

In article <37C60A34.BA2A611B_at_comp.polyu.edu.hk>,   Jimmy <c6635500_at_comp.polyu.edu.hk> wrote:
> Hello all,
> I have two questions: (in Oracle 7.3.3)
>
> 1) Why the following SQL statement returns 'aaa'?
>
> select 'aaa' from dual where 'LOW_D_LIMIT' like 'L_%';
>
> Is '_' means special character? 'LOW_D_LIMIT' not contains the
> string like 'L_' and it should return 'no rows returned' I
> think......... but it returns 'aaa'....
>
> 2) I want to develop a trigger like this:
>
> create or replace trigger testing
> after update or insert or delete on aaa
> begin
> if updating then
> if updating(fieldA) then
> pro1;
> end if;
> pro_all;
> elsif inserting then
> ...
> elsif deleting then
> ...
> end if;
> end;
> /
>
> If update column fieldA, then do pro1 and pro_all Other columns
> updating do only pro_all.
> However, errors in creating this trigger.... Is it possible to
check
> which column is updated in the updating part? I cannot do this:
>
> create or replace trigger testing
> after update(fieldA) or insert or delete on aaa
> ...
>
> since this trigger only fired if fieldA is updated.
>
> Thanks,
> Jimmy
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Aug 27 1999 - 12:16:35 CDT

Original text of this message

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