pre update trigger

Hi all

I created a procedure on the database called K_F_VACS1.

all I have to that before the update on the table 'Company' field 'SALARY_MONTH' execute the procedure called K_F_VACS1.
Note:-the company table has only 1 record no more.


It is the K_F_VACS1 procedure if necessary.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CREATE OR REPLACE PROCEDURE PRL. K_F_VACS1 IS

cursor vacx is select PRL_CODE, EMVC_VAC_CODE, EMVC_OPN_BAL de PRL_EMPVAC; - WHERE PRL_CODE = 3751;


x NUMBER;
EMP_DGRe NUMBER;
EMP_JOB_CODEe NUMBER;
NUMBER OF TOT_VAC;
MON1 NUMBER;
NUMBER OF MAX_DAY;
Number of Y_d;
Start



Select the double y_d to_number (to_char (last_day (to_date(02,'mm')), 'dd'));
If Y_d = 28 may
Y_d: = 365;
elsif Y_d = 29 then
Y_d: = 366;

end if;

I'm looping vacx
SELECT MF_LAST_DEGR, MF_JOB_CODE IN EMP_DGRe, EMP_JOB_CODEe FROM PRL_MF WHERE PRL_CODE = I.PRL_CODE;

If EMP_DGRe <>28 may
Select DGR_LEAVE from tot_vac
of PRL_DEGR
where DGR_CODE = EMP_DGRe;

on the other
If EMP_JOB_CODEe (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,33,209,222,257, 269, 286) then
tot_vac: = 60;
elsif EMP_JOB_CODEe in (34, 36,39,48,49,50,51,52,53,54,55,210,268,293,295,309) then
tot_vac: = 45;
on the other
tot_vac: = 30;
end if;

end if;

-my 1: = tot_vac/y_d;
MON1: = tot_vac/12;
MAX_DAY: = tot_vac * 2;
IF I.EMVC_OPN_BAL + mon1 > = MAX_DAY THEN
UPDATE PRL_EMPVAC SET EMVC_OPN_BAL = MAX_DAY, EMVC_LST_UPD_DT IS SYSDATE WHERE PRL_CODE = I.PRL_CODE;.
COMMIT;

ELSIF I.EMVC_VAC_CODE = 1 AND I.EMVC_OPN_BAL + mon1 < MAX_DAY THEN

UPDATE PRL_EMPVAC SET EMVC_OPN_BAL = EMVC_OPN_BAL + mon1, EMVC_LST_UPD_DT = SYSDATE WHERE PRL_CODE = I.PRL_CODE;
COMMIT;
END IF;



END LOOP;
end;
/
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Respectfully
Khaled Farouk

Hi Khaled,
There is no keyword CALL not required.

CREATE OR REPLACE TRIGGER trg
BEFORE UPDATE
OF c2
ON t
--REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
begin
CALL dbms_output.put_line('Hello');
null;
end trg;
/
show errors;

Warning: execution completed with warning
TRIGGER trg Compiled.
2/6            PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the following:

   := . ( @ % ;
The symbol ":=" was substituted for "DBMS_OUTPUT" to continue.

However... If you remove CALL

CREATE OR REPLACE TRIGGER trg
BEFORE UPDATE
OF c2
ON t
--REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
begin
 dbms_output.put_line('Hello');
null;
end trg;
/
show errors;

TRIGGER trg Compiled.
No Errors.

I hope this helps.

VR,
Sudhakar B.

Tags: Database

Similar Questions

  • Table is the mutation of error in after the update trigger

    Hello

    In all of my table, I have columns EDITDATE and EDITUSER. So whenever a table is updated I need to update these two fields with the USER and SYSDATE. For this I use a BEFORE UPDATE trigger. This trigger is activated, but I get "ORA-04091: table %s.%s is changing, function of triggering/can not see" error every time I update the table. I used this method in SQL Server. I understand that Oracle doesn't have to be the same as SQL Server but I do not know there is a way to do this. Do you know what it is?

    EDIT: Here is the Code of the trigger

    create or replace
    TR_LEGISLATION_CALCUL_AE RELAXATION
    BEFORE THE UPDATE
    ON LEGISLATION_CALCUL
    FOR EACH LINE
    DECLARE
    v_LEGISLATIONCALCULID NUMBER (10,0);

    BEGIN
    SELECT: NEW. LEGISLATIONCALCULID

    IN v_LEGISLATIONCALCULID
    FROM DUAL;
    UPDATE LEGISLATION_CALCUL
    SET EDITUSER_ID = UID,
    EDITDATE = SYSDATE
    WHERE LEGISLATIONCALCULID = v_LEGISLATIONCALCULID;
    END;

    Published by: Mikhail on 12 March 2012 23:54

    Mikhail says:
    Hello

    In all of my table, I have columns EDITDATE and EDITUSER. So whenever a table is updated I need to update these two fields with the USER and SYSDATE. For this I use the AFTER UPDATE trigger. This trigger is activated, but I get "ORA-04091: table %s.%s is changing, function of triggering/can not see" error every time I update the table. I used this method in SQL Server. I understand that Oracle doesn't have to be the same as SQL Server but I do not know there is a way to do this. Do you know what it is?

    EDIT: Here is the Code of the trigger

    create or replace
    TR_LEGISLATION_CALCUL_AE RELAXATION
    BEFORE THE UPDATE
    ON LEGISLATION_CALCUL
    FOR EACH LINE

    just put this in your before update (and not after the update as you mentioned) for each trigger line:

    BEGIN
    
    :new.EDITUSER_ID := UID;
    :new.EDITDATE := SYSDATE;
    
    END;
    
  • After the update trigger

    I'm updating of certain rows in a table from front end applications...

    If I update a particular Null line... then the other value in the column is to replace assets

    Can I write an update trigger after for this

    Can we use if like else statements in triggers

    If a is null, then b is active
  • After that insert update trigger does not work properly

    Hello experts!

    I created an insert/update trigger after and what strikes me is that it does not work as expected.
    The trigger starts a procedure that performs an insert in a second case of changing values table triggered table ("my_table").

    The problem is that in my second table values, which are correlated to the "my_table", are not changed by the correct values immediately. The trails of the trigger and insert!

    I need to update two times to values appear in my second table. Then only the data of the first update will be inserted in the second recital to table the table parent ("my_table") held the most recent values.

    Do you have an idea what could be the problem?
    create or replace
    trigger myscheme.after_update_insert_set_tw
     after update or insert
      on myscheme.my_table
      for each row
      
    declare 
    
    begin
    
     pr_my_table_tw_sync_sk(:new.lng_falle, :new.int_fallennummer, :new.lng_schaedling, :new.objectid);
    
    
    end;
    Brgds,

    SEB

    Remove the pragma autonomous_transaction and validation of your relaxation. This might be the reason. The transaction autonoumous cant properly consider the values of the current transaction (which is not engaged yet).

    This is not logically (if the upgrade fails or is rolled at the time you do not want the inserted row).

    If you then get a problem because the mutation of tables, you will need a different solution: an autonoumous transaction is not the right solution to workaround.

  • help find out what is wrong w / my before update trigger

    Let me this prefix w / the fact that I am a fool, so be nice.

    I have a trigger that does not (apparently), and I'll google out so I thought I would ask and see if someone could not provide thoughts, insults, suggestions or what have you.

    Database used is 10g XE and updates are performed in a transactional way.

    I have a table that contains (among other things) the status of a particular type of transaction (specific application). When this status changes to a particular value, I have a trigger that updates another table with the date on which that status change took place.

    < pre > Table: XTransaction
    ID (pk)
    StatusID (integer)
    ... < / pre >

    and here is my trigger:

    < pre > create or replace trigger x_transaction_update before update on xtransaction
    for each line
    declare
    Start
    If (: old.statusid = 1) then - it's here because I got an error when I tried to use a when clause above
    Start
    -I log in before the update with some other info to tell whether or not I've been to this task
    Update sometable set when_it_happened = sysdate where xtransid =: old.id;
    -I log in after the update too
    exception
    while others then
    -I connect sqlerrm
    end;
    end;
    end if;
    end; < / pre >


    Here's what I could gather through tests and display the logs of the trigger:

    1. There is no exception being connected,
    2. the update of pre/post connects with all the correct data (to prove that the trigger is activated),
    3. when I update xtransaction for visual studio (via the oracle complement that allows to execute queries against the database), the State is changed, the trigger is activated and the other table is updated.
    4. when running the application that normally updates the xtransaction table, xtransaction is updated, the trigger is activated and sometable is not updated.



    So I have absolutely no idea where to go with this one. Usually I could launch sql server Query Analyzer and watch what comes through, and I tried commercial tool use Toad to do this, but nothing is. I tried to change to an update after, but had the same results. I wrote this a few months ago and it worked then, but not now.

    Thanks a lot for the display of the actual error.

    Are you trying to work around the famous error table mutation here?
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:8323596621929

    You should use the transaction autonomous only for error logging procedure.
    You use a registration for different purposes.
    You are being "independent" on totally different levels.
    Creating a "while OTHERS" - registration procedure (being an autonomous transaction), or remove WHEN E.A.
    (or: delete the other calls to your logging procedure).
    This is a right step: get rid of the "distractions" and keep your code clean/crisp and clear as possible.

  • Help update trigger

    Hello

    I am new to the creation of triggers and I would really appreciate help this building.

    During the update of a datetime field in the database for each line, I need to update a status of 10 to 12, based on a query WHERE.

    This is what I wrote, but they compile correctly, failing - "Missing or invalid option".

    CREATE OR REPLACE TRIGGER VR. PKT_HDR_INTRNL_RX

    AFTER UPDATE

    OF CREATE_DATE_TIME

    ON RV. PKT_HDR_INTRNL

    FOR EACH LINE

    BEGIN

    SET STAT_CODE = '12'

    WHERE PKT_CTRL_NBR IN

    (BY SELECTING PKT_CTRL_NBR FROM the PKT_DTL PD

    INNER JOIN ITEM_MASTER IM IM. SKU_ID = DB. SKU_ID

    WHERE SPL_INSTR_CODE_9 = "RX")

    AND STAT_CODE < '15');

    END;

    Could you please direct me as to where I'm wrong?

    You are missing the part update of the update statement.

  • UPDATE trigger

    Hi all

    I would like to help if this triggers, as I don't know if I did it correctly. But I don't think I have.

    create or replace TRIGGER update_ExpiryDate
    BEFORE INSERT ON Drivers
    FOR EACH ROW
    WHEN (new.ExpiryDate <= '01-JUL-2015')
    BEGIN
          UPDATE Drivers
          SET Renewal = '02-JUL-2017'
          WHERE EXPIRYDATE <= :new.ExpiryDate;
    END;
    

    Let me explain what I want the trigger to do. I want to update a column called renewal, if the license has expired. I'm not sure if I'm missing something but its not working do not at all / can you please help?

    Thank you

    Fareedh

    3128080 kirjoitti:

    Well, I want to do is update the renewal date for "1 July 2017 ' if the lower expiry date 1 June 15 > that's what I'm trying to do.

    Thank you

    So why not do as others have already suggested. Govern this value in your original trigger (without update part) for all new lines if you wish.

    When: new.expirydate< date="" '2015-06-01'="" then="" :new.renewal="" :="date">

    If the old lines need fixing, and then with a single update statement.

    update drivers set = renewal date ' 01-07-2017' where had< date="">


    After that, you should have no record of drivers with dates of renewal except July 1, 2017 when displayed<>

  • UPDATE to update trigger another table

    I am trying to write a trigger to the table (AFTER UPDATE) in which I want to update the same table in a different pattern. Notice that both tables has no unique or primary key constraint, so I am forced to compare the values in the column all the to the place where the condition.

    Update OTHERSCHEMA. T1

    the value =:NEW.c1 c1, c2 is:NEW.c2...

    where c1 =:OLD.c1

    AND c2 =:OLD.c2

    Problem is when a column is null, it would seem that it is not comparable. I even tried

    Update OTHERSCHEMA. T1

    the value =:NEW.c1 c1, c2 is:NEW.c2...

    where NVL (c1, NULL) = NVL (:OLD.c1, NULL)

    AND NVL (c2, NULL = NVL (:OLD.c2, NULL)

    Nothing helps. Can someone help me to write the correct statement?

    Hello

    eyap wrote:

    I am trying to write a trigger to the table (AFTER UPDATE) in which I want to update the same table in a different pattern. Notice that both tables has no unique or primary key constraint, so I am forced to compare the values in the column all the to the place where the condition.

    Update OTHERSCHEMA. T1

    the value =:NEW.c1 c1, c2 is:NEW.c2...

    where c1 =:OLD.c1

    AND c2 =:OLD.c2

    Problem is when a column is null, it would seem that it is not comparable. I even tried

    Update OTHERSCHEMA. T1

    the value =:NEW.c1 c1, c2 is:NEW.c2...

    where NVL (c1, NULL) = NVL (:OLD.c1, NULL)

    AND NVL (c2, NULL = NVL (:OLD.c2, NULL)

    Nothing helps.

    Naturally.  NVL (x, NULL) is always x, no matter what x is.

    Can someone help me to write the correct statement?

    x = is returns TRUE if (and only if) x and have the same value, and it returns FALSE if (and only if) x and have 2 different values.

    NULL is not a value; in fact, it's quite the opposite.  NULL means that there is no value.  If x or is NULL, then x = y returns UNKNOWN.

    DECODE allows to compare values or NULL values, so you can do something like

    Update OTHERSCHEMA. T1

    the value of c1 =: NEW.c1

    , c2 =: NEW.c2

    ,       ...

    where LESS (DECODE (c1,:OLD.c1, 1, 0)

    , DECODE (c2,:OLD.c2, 1, 0)

    )

    ;

    If you would care to a full test script so that I can reproduce the problem, then I could test this.

    Triggers often indicate a bad table design.  Why do you need to replicate the data in another table?

    As you do, why not add a primary key?

  • Update to Update trigger stmnt

    Hi all

    This is my requirement:-J' have a table that has the XML column. Need to convert this xml column and store the hash value in column hash_val when an insert or an update occurs on this table.

    create or replace package comp_pkg as 
      type comp_tab_type is table of rowid index by binary_integer;
      comp_tab comp_tab_type;
      comp_index binary_integer;
    end comp_pkg;
    /
    
    
    create or replace trigger comp_bef_stm_all before insert or update or delete on TBL_COMPONENT_XSL
    begin 
      --Remember to reset the pl/sql table before each statement  
      comp_pkg.comp_index := 0;
    end;
    /
    
    
    create or replace trigger comp_aft_row_all after insert or update or delete on TBL_COMPONENT_XSL
    for each row
    begin 
       --Store the rowid of updated record into global pl/sql table
       comp_pkg.comp_index := comp_pkg.comp_index + 1;
       comp_pkg.comp_tab(comp_pkg.comp_index) := :new.rowid;
    end;
    /
    
    
    create or replace trigger comp_aft_stm_all after insert or update or delete on TBL_COMPONENT_XSL
    begin
          for i in 1 .. comp_pkg.comp_index loop 
          -- Re-process the updated records.
          --There is no restriction here.
          dbms_output.put_line(comp_pkg.comp_tab(i));
          update TBL_COMPONENT_XSL TCX set hash_val = ora_hash(TCX.COMPONENT_XSL.getClobVal());
          commit;
    end loop;
    comp_pkg.comp_index := 0;
    end;
    /
    

    I can't put this in comp_aft_stm_all and continuous update statement to call again and again and loops. Is there anyway that I can avoid this?

    Description of the table: -.

    SQL> desc tbl_component_xsl
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     COMPONENT_XSL_ID                          NOT NULL NUMBER(18)
     LINE_OF_BUSINESS                          NOT NULL VARCHAR2(30)
     ORDER_SOURCE                              NOT NULL VARCHAR2(10)
     COMPONENT_NAME                            NOT NULL VARCHAR2(30)
     COMPONENT_SCHEMA_VERSION                  NOT NULL NUMBER(9)
     ACCESS_LEVEL                              NOT NULL VARCHAR2(30)
     COMPONENT_XSL                             NOT NULL SYS.XMLTYPE STORAGE BINARY
     DESCRIPTION                               NOT NULL VARCHAR2(200)
     HASH_VAL                                           NUMBER
    

    Thank you

    Mani

    Do you see an UPDATE statement in the code example I provided?

    Have you tried the code I provided?

    The trigger is already PART of a statement to upate. When the trigger is activated, you are ALREADY updated in the table.

  • BEFORE UPDATE TRIGGER

    Hi, I just start to learn oracle and I have a problem that causes trigger to duplicate registration of the Pavilion.

    CREATE OR REPLACE TRIGGER Data.DOUBLE BEFORE UPDATE ON Data.PERSONAL FOR EACH LINE

    DECLARE

    INTEGER TEMP;

    BEGIN

    TEMP: = 0;

    SELECT COUNT (*)

    IN TEMP

    STAFF

    WHERE (TRIM (NAME) = TRIM(:NEW.NAME) AND TRIM (MOTHER) = TRIM(:NEW.) THE MOTHER) AND TRIM (FATHER) = TRIM(:NEW.) THE FATHER)) OR

    (BORN_DATE =: NEW.) BORN_DATE AND TRIM (NAME) = TRIM(:NEW.NAME) AND TRIM (MOTHER) = TRIM(:NEW.) THE MOTHER)) OR

    (BORN_DATE =: NEW.) BORN_DATE AND TRIM (NAME) = TRIM(:NEW.NAME) AND TRIM (FATHER) = TRIM(:NEW.) «"' FATHER));»»»

    IF TEMP > 0 THEN

    : NEW. STATUS: = '4';

    END IF;

    END;

    /

    Can anyone solve my problem?

    Best regards

    Abdul

    Thanks for all answers, now I can't believed that should never use trigger before update on the same table

  • BEFORE the UPDATE trigger between field in both tables

    Hi Oracle Experts,

    I'm a newbie in the triggers. I want to do a trigger that fires whenever changes are made to a table, updates a field in the second table. The details are as below:

     SAMPLE (
    SAMPLEID    NUMBER(10,0)
    ACTIVITYID     NUMBER(10,0)
    ACTIVITYTABLEID     VARCHAR2(20 BYTE)
    SAMPLEDT     DATE
    SAMPLEPTID     VARCHAR2(20 BYTE)
    SAMPLENOTIFY     VARCHAR(1 BYTE)
    )
    

    SAMPLE_RESULT(
    SAMPLEID     NUMBER(10,0)
    TESTID     VARCHAR2(20 BYTE)
    PROPERTYID     VARCHAR2(20 BYTE)
    TESTERID     VARCHAR2(20 BYTE)
    ENTRYDT     DATE
    RESULTNUM     NUMBER(18,8)
    RESULT     VARCHAR2(20 BYTE)
    RESULTTYPE     VARCHAR(1 BYTE)
    RESULTSTATUS     VARCHAR2(1 BYTE)
    )
    

    The idea of relaxation:

    CREATE OR REPLACE
    TRIGGER "DBA".AUTO_NOTIFY
    BEFORE UPDATE OF RESULT ON SAMPLE_RESULT
    FOR EACH ROW
    WHEN (NEW.PROPERTYID = 'Action Taken')
    BEGIN
    
    //my idea
    :new.sample.samplenotify = 'S'
    
    //but i don't know how to make a reference to another table
    
    END;
    

    The trigger will fire every time the propertyid is pronounced, it sets the value of samplenotify in the example in table for the of '.

    Is this possible?

    Thank you in advance.

    La: new.column_name syntax applies only to the table that the trigger is on.  You will need to use an update on the other table.

    CREATE OR REPLACE TRIGGER auto_notify

    BEFORE the UPDATE result WE sample_result

    FOR EACH LINE

    WHEN (NEW. PROPERTYID = "Taken Action")

    BEGIN

    Example of UPDATE

    SET s = samplenotify"

    WHERE sampleid =: NEW.sampleid;

    END auto_notify;

    /

  • FOR Update trigger compounds

    On DB 11.2. I created a trigger to update COMPOUND on my table as below:

    CREATE OR REPLACE TRIGGER AUDU_ATTENDANCE
    UPDATE
    ON ATTENDANCE
    COMPOUND OF TRIGGER

    I now try to include specific columns I want checked to update, but it doesn't seem like it. I know you can do this with triggers "AFTER UPDATE", but this does not work for the COMPOUND. Other options?

    CREATE OR REPLACE TRIGGER AUDU_ATTENDANCE
    UPDATE
    OF ATT_COMMENT
    ON ATTENDANCE
    COMPOUND OF TRIGGER

    bobmagan wrote:
    On DB 11.2. I created a trigger to update COMPOUND on my table as below:

    CREATE OR REPLACE TRIGGER AUDU_ATTENDANCE
    UPDATE
    ON ATTENDANCE
    COMPOUND OF TRIGGER

    I now try to include specific columns I want checked to update, but it doesn't seem like it. I know you can do this with triggers "AFTER UPDATE", but this does not work for the COMPOUND. Other options?

    CREATE OR REPLACE TRIGGER AUDU_ATTENDANCE
    UPDATE
    OF ATT_COMMENT
    ON ATTENDANCE
    COMPOUND OF TRIGGER

    "it doesn't seem like it" mean? I guess you found a mistake, one which?

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25519/triggers.htm#LNPLS740

    Shows an example with the syntax
    "9-9 Trigger composed newspapers example changes a single table in another Table"

    that seems to be what you have

    CREATE OR REPLACE TRIGGER maintain_employee_salaries
      FOR UPDATE OF salary ON employees
        COMPOUND TRIGGER
    

    See you soon,.

  • Multicolumn update trigger

    Hello

    I want to have a track history of any data that has already been updated in a table. Say that table1 has 100 columns and to store historical data on change, I did another table track_table1 with columns: updated_column_name, old_data, you see, mod_time.

    For this history of data storage, I need to write a trigger in which I will identify all columns whose value update and insert the name and column values in the track_table1 table.

    What I'm doing now is to check each of the 100 new and old value column inside the trigger to know what columns have been updated. This increases the code and oracle must also check the values of each column 100 to find out if it is updated.

    Is there a way where oracle itself can give a list of columns that have values updated by the update? While there is no need to check the values old and new in each column of the table.

    I am using oracle 9i and 10 g databases.

    -----------------------------------
    Thank you very much in advance,
    Kawa

    If the update (')
    end if;

    Issue of doc!

    But I know that nobody here ever reads documentation. That requires an effort!

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • Update trigger (the table_name is mutation)

    Hi refugees,

    Can someone help me solve my problem.

    ---------

    create table XE_TEST (number SAL, UPDATED_FLAG varchar2 (1));

    Insert into XE_TEST values(5000,'Y');

    Select * from XE_TEST;

    create the table XE_TEST1 select * from XE_TEST;

    ----------


    CREATE OR REPLACE TRIGGER XE_UPDATE_TRG
    AFTER UPDATE ON XE_TEST
    FOR EACH LINE
    DECLARE
    BEGIN
    IF (: NEW.) UPDATED_FLAG = 'Y') then
    Update XE_TEST1 set SAL =: NEW. SAL;
    end if;

    Update XE_TEST set UPDATED_FLAG = 'n';

    EXCEPTION
    WHILE OTHERS
    THEN
    raise_application_error (-20100, SQLERRM);
    END;
    /



    -------------

    Update XE_TEST set sal = 4000;

    --------------

    * I had the error of Toad *.
    (ORA-20100: ORA-04091: table SYSTEM1.) XE_TEST is changing, function of triggering/can not see
    ORA-06512: at the 'SYSTEM1 '. XE_UPDATE_TRG', line 12
    ORA-04088: error during execution of trigger ' SYSTEM1. XE_UPDATE_TRG') while I run the Update statement.

    How can I write the trigger to change the value of UPDATED_FLAG field in the "n" and update the value in the XE_TEST table.
    SQL> create table XE_TEST(SAL number,UPDATED_FLAG varchar2(1));
    
    Table created.
    
    SQL> Insert into XE_TEST values(5000,'Y');
    
    1 row created.
    
    SQL> select * from XE_TEST;
    
           SAL U
    ---------- -
          5000 Y
    
    SQL> create table XE_TEST1 as select * from XE_TEST;
    
    Table created.
    
    SQL> select  *
      2    from  xe_test
      3  /
    
           SAL U
    ---------- -
          5000 Y
    
    SQL> select  *
      2    from  xe_test1
      3  /
    
           SAL U
    ---------- -
          5000 Y
    
    SQL> CREATE OR REPLACE
      2    TRIGGER XE_UPDATE_TRG
      3    BEFORE UPDATE
      4    ON XE_TEST
      5    FOR EACH ROW
      6    DECLARE
      7    BEGIN
      8        IF :NEW.UPDATED_FLAG = 'Y'
      9          then
     10            update XE_TEST1 set SAL =:NEW.SAL;
     11        end if;
     12        :NEW.UPDATED_FLAG := 'N';
     13  END;
     14  /
    
    Trigger created.
    
    SQL> Update XE_TEST set sal=4000;
    
    1 row updated.
    
    SQL> select  *
      2    from  xe_test
      3  /
    
           SAL U
    ---------- -
          4000 N
    
    SQL> select  *
      2    from  xe_test1
      3  /
    
           SAL U
    ---------- -
          4000 Y
    
    SQL> 
    

    SY.

  • BackingMap updates trigger EventListeners

    3.7 consistency, since in an EntryProcessor update another entry via map of support directly (on a partition level operation). This update will trigger the dumps and BackingMapListeners respectively for the other entry?

    I have a dumps that persists changes asynchronously, so wonder if direct changes to the map of support will be also persisted

    Thank you

    Hi David,

    Yes, the CacheStores and the BackingMapListeners fires with direct updates to a storage card.

    Although you have not asked about them, MapTriggers may or may not be fired depending on how the support plan is updated. If you get real support plan and do an update then the trigger does not fire unless you use the new 3.7 path of update of media by obtaining the entry of a key of the BackingMapContext and the appellant setValue during entry then the trigger fires.

    JK

Maybe you are looking for

  • Re: Qosmio F50 - 12W - front buttons have stopped working

    Hi, I am the F50 - 12W. It is under Vista Home Premium. First thing I did was to go through the list of services and the vista settings, turn off everything I don't don't need or use. Worked a treat. But... Only problem now is that I managed to stop

  • PSU

    Can I replace my existing power supply in my presario SG3200uk: with a 55OW CIT 12 CM SILENT ATX PSU gold or a GOLD 500W 12CM colors

  • Bad version of vi

    Friday, I edited a VI opening 'My Computer' and made a mistake in editing. This has a drop-down list VI list drop-down and I just modify items in this drop-down list box. The next time that I edited the VI (today) I opened it in its lvlib file. Now w

  • P3 - 171 how to change Windows 8.1 to Windows 8?

    I bought my P3-171. I have downloaded all Windows updates, then I installed Windows 8.1. Then everything became extremely slow, so I decided to go back to Windows 8. Before that, I installed the latest version of the BIOS to v2.07. I see Windows 8.1

  • DVD cdr does not

    try to put photos on a CD, but he always tells me no disc in the CD drive d, but there is a disc in there please help