ORA-04091 mutation, trigger/function

Hi all
I am trying to generate the reference number for the ref_num column
the serial number should be under this Formate:
Year/serial number
This trigger after update of the 'status' column when the value of the "s".
BEGIN  
  IF p_status = 'S' THEN
    SELECT NVL(MAX(TO_NUMBER(SUBSTR(REF_NUM,6))),0) +1 
    Into vCURR_REF
    FROM ADM_MISSION_REQ_HDR        
    WHERE SUBSTR(REF_NUM,1,4) = TO_CHAR(P_REQ_DATE,'YYYY');
    vREF_NUM :=   TO_CHAR(P_REQ_DATE,'YYYY')||'/'||vCURR_REF;
  END IF;   
RETURN vREF_NUM;      
 EXCEPTION
    WHEN NO_DATA_FOUND THEN
     vREF_NUM :=   TO_CHAR(P_REQ_DATE,'YYYY')||'/'||'1';
RETURN vREF_NUM;
    
END;
This error pops up
ORA-20999: 
ORA-06512: at "HSO.CG$ERRORS", line 563
ORA-06512: at "IAIGC.CG$ADM_MISSION_REQ_HDR", line 931
ORA-20999: 
ORA-06512: at "HSO.CG$ERRORS", line 563
ORA-06512: at "IAIGC.CG$ADM_MISSION_REQ_HDR", line 116
ORA-04091: table IAIGC.ADM_MISSION_REQ_HDR is mutating, trigger/function may not see it
ORA-06512: at "IAIGC.CG$BUR_ADM_MISSION_REQ_HDR", line 105
ORA-04088: error during execution of trigger 'IAIGC.CG$BUR_ADM_MISSION_REQ_HDR'
ORA-06512: at line 1
Help, please

Published by: your * may 3, 2011 12:53

http://www.Oracle-base.com/articles/9i/MutatingTableExceptions.php
http://www.Oracle-base.com/articles/Misc/DatabaseTriggersOverview.php

Tags: Database

Similar Questions

  • Changing table - SQL error: ORA-04091: table XYZ is changing, function of triggering/can not see

    Hi all

    I am a newbie to Oracle and I am faced with the above error. Please see the below code snippets. Can someone please tell what I am doing wrong? Thank you in advance.

    Thank you

    CREATE TABLE ABC

    (

    ID VARCHAR2 ENABLE NUMBER NOT NULL,

    FIELD1 ACTIVATE THE NUMBER NOT NULL,

    FIELD2 ACTIVATE THE VARCHAR2 (8 BYTE) NOT NULL,

    CONSTRAINT JOB_PK PRIMARY KEY (ID)

    )

    ;

    CREATE TABLE XYZ

    (

    ACTIVATE THE NUMBER 4 R_ID NOT NULL,.

    ID VARCHAR2 ENABLE NUMBER NOT NULL,

    Column1 NUMBER (2.0) default 0.00,.

    Column2 NUMBER (2.0) default 0.00,.

    COLUMN3 NUMBER (2.0).

    NUMBER (2.0) TOTAL 0.00 default.

    CONSTRAINT TRIP_PAYMENT_PK PRIMARY KEY (ID)

    )

    ;

    create or replace trigger trigger1

    After Insert on XYZ

    for each line

    Declare

    number of newTotal;

    Start

    newTOTAL: =: new. Column1 +: new. Column2 +: new. COLUMN3;

    setting a day of XYZ together Total = newTotal;

    end;

    Insert into ABC (1, 45, ' Demo');

    insertion in XYZ (1, 1, 12.50, 10.20 33,50, ");

    Error report:

    SQL error: ORA-04091: table XYZ is changing, function of triggering/can not see

    Try one before line

    create or replace trigger trigger1

    before inserting on XYZ

    for each line

    Start
    : new. TOTAL: =: new. Column1 +: new. Column2 +: new. COLUMN3;
    end;

  • How to troubleshoot the ora-04091: table of mutation

    Hi all

    Oracle version: 10g express.

    case study: a class has many students, that a student has rewards.

    original design:
    drop table student;
    drop table class;
    
    create table class(
    clsid varchar2(9) primary key);
    
    create table student(
    stuid varchar2(9) primary key,
    clsid varchar2(9) not null references class(clsid) on delete cascade,
    reward varchar2(9));
    sample data:
    insert into class values('cls1');
    insert into student values('stu1','cls1','yes');
    issues related to the:
    1. If I want to
     insert into student values('stu2','cls1','yes'); 
    I can put a trigger on student to check if he has that one student in class reward. This trigger must tell me error: I can not leave 'stu2' a 'Yes' on the column of the reward. But he'll lead us Oracle error: ora-04091: table of mutation. He seems to use 'after' or 'instead of' trigger can solve this problem, then how?

    2. Another way to ensure that a student in a class reward, is to change the design as:
    drop table student;
    drop table class;
    
    create table class(
    clsid varchar2(9) primary key,
    reward_stuid varchar2(9));
    
    create table student(
    stuid varchar2(9) primary key,
    clsid varchar2(9) not null references class(cid) on delete cascade);
    But the question of these two tables has one foreign key to the other, is it good design?

    Thank you.

    Published by: 991096 on April 11, 2013 04:56

    Do not use a trigger for this. This is the logic that you should include in your application as a 'check' pre before even attempting insert, or...
    You use an INSERT... SELECT... statement that incorporates the audit as part of it, so the line will be inserted only if the proper test is satisfied.

    for example

    insert into student (stuid, clsid, reward)
    select 'stu2', 'cls1', 'yes'
    from   dual left outer join student s2 on (s2.clsid = 'cls1' and s2.reward = 'yes')
    where  s2.stuid is null; -- only insert if no other student is found in same class already with reward
    

    and then, your application can control SQL ROWCOUNT % to see if the line was inserted or not.

    (Similarly, you can use a MERGE statement or clause EXISTS (NOT) or any method to do so)

  • ORA-04091: table is mutation in a scenario

    Hello everyone

    I have a scenario like this:

    There are 2 diagrams USER1 and USER2. There is a table (say STATUS_TABLE) with a similar structure in the two schemas. In a scenario of some USER1 must say USER2 about a flag that needs updates in user2. STATUS_TABLE. For this, an intermediate table (called INTER_TABLE) was created. Now USER1 inserts an entry in the INTER_TABLE table and there is a trigger for insertion on the INTER_TABLE that updates this indicator in USER2. STATUS_TABLE. Once this update is over, record in INTER_TABLE is useless and should be deleted. Now the delete statement in the same trigger on INTER_TABLE laying ORA-04091: table is the mutation. The same thing must hapeen in the other direction as well (for example user1 user2).

    Something like this:
    USER1.STATUS_TABLE          INTER_TABLE          USER2.STATUS_TABLE
                       1 row inserted
               ---------------->
                        trigger on insert------->update a flag here
                      delete that rec from INTER_TABLE     
                           => ORA-04091: table is mutating
    What would be the good approach to perform this feature?

    I hope I explained the scenario correctly :). If you need more details, please let me know

    Thank you
    Amardeep Sidhu

    Amardeep Sidhu wrote:
    In fact, USER1 & USER2 are in different databases and are managed by different vendors.

    You said at first the different schemas. Now, you say too different databases.
    So, need you a database link then, right?

    Amardeep Sidhu wrote:
    And they can not give each other the privilege to insert directly to STATUS_TABLE. So there must be an intermediate table for communication.

    Do you mean that they want to control the code that performs the insert/update in their own table of STATUS?
    In the affirmative. Then let him write a stored procedure to it. And grant execute on the stored procedure to the other provider (vice versa).

    The table mid-range + remains of trigger solution "outlandish."

  • ORA-04091 and composed the trigger

    Hi all, I have the following table:

    ID_PARTITION VARCHAR2 (20)

    ROLE_NOW VARCHAR2 (CHAR)

    DATE OF THE REMOVAL

    EDITION OF VARCHAR2 (3)

    DATE OF UPDATE_DATE

    If MOUNTING column is updated 'worthless', a trigger should update the UPDATE_DATE column with the value 'sysdate.

    I get the error ORA-04091 on the execution of the trigger. So I try to use the TRIGGER COMPOUND modifing the trigger existing as follow:

    CREATE OR REPLACE

    Tri_hot_active RELAXATION

    FOR the UPDATE OF the edition ON tab_informations

    COMPOUND OF TRIGGER

    v_partition VARCHAR2 (20);

    v_get VARCHAR2 (100);

    v_update_sql VARCHAR2 (1000);


    AFTER EACH ROW IS

    BEGIN

    dbms_output.put_line ('top');

    If: new.editing = 'no' THEN

    v_partition: =: old.partition_id;

    dbms_output.put_line ('v_partition =' | v_partition); -debug purpose

    dbms_output.put_line (' old v_update = ' |: old.update_date); -debug purpose

    v_update_sql: = "update tab_informations set = sysdate update_date where id_partition =" ' |: new.partition_id | "" ' ;

    dbms_output.put_line ('v_update_sql =' | v_update_sql); -debug purpose

    immediately run v_update_sql;

    end if;

    END AFTER EACH LINE;

    END tri_hot_active;

    /

    But I still get ORA-04091. Can you suggest me a solution?

    I'm working on 11 GR 2.

    Thank you

    Ste

    Now...

    you would do that in a BEFORE trigger rather than in AFTER

    and you just change the ': NEW ' values of the content that you want to use for the update

    HTH

  • ORACLE/PLSQL: ORA-04091

    Hi all

    I have a package which includes a procedure. I use this procedure to insert data to the table of ps_acu_sf_tahs so provide certain conditions. But when I try to run as below:

    Start

    tahs_aktarim_.tahs_aktarim ('45397', 'T1');

    end;

    I m error: ORA-04091

    I checked all the triggers that will effect ps_acu_sf_tahs table but there is no trigger that the effect of this table.


    I'm just curious to know what is the problem if there is no trigger for this table.

    Is there someone who has a similar strange problem?

    Kind regards

    Gunce

    You use a function in an insert that reads data from the table, he's trying to change.

    Relational DBs must be atomic (anything a DML change statement is supposed to happen at the same time) and that these things that Act on the data of DML must be deterministic - that is give the same result, even if the plan enforcement and competition is different.   Your situation is not deterministic, then Oracle generates an error.

    The simplest solution is to select the result of taksit_bul (p_national_id) in a variable and use the variable in the insert statement.  That should cure the changing table.

    v_taksit_bul: = taksit_bul (p_national_id);

    [snip]...

    INSERT INTO ps_acu_sf_tahs

    SELECT "ACU"

    b.EmplId,

    b.acad_career,

    b.stdnt_car_nbr,

    b.acad_prog,

    ps_acu_tahs_sequence. NEXTVAL,

    To_date (a.updated, 'RRRRMMDD'),

    v_acu_debit_term,

    v_acu_debit_type,

    v_acu_payment_term,

    v_taksit_bul,-CHANGE NEW HERE!

    v_acu_payment_typ,

    a.amount,

    v_currency_cd,

    v_acu_kur,

    a.amount * v_acu_kur,.

    "TUR,"

    v_bank_cd,

    v_branch_ec_cd,

    v_account_num,

    ' N ',

    v_oprid,

    SYSDATE,

    v_comments

    Ps_acu_tahs a, ps_acu_stu_info b

    WHERE a.national_id = b.national_id

    AND a.national_id = p_national_id

    AND acu_flag3 = p_flag

    AND prog_status IN ('AC', 'THE');

  • Shutter button to copy records from one table to another;  ORA-04091:

    Hello

    I am trying to create a trigger that will move data from one table to the other.

    I have two tables (Trial1, Trial2) two of them contains the same attributes (code, c_index)

    I want to spend each new record inserted in (code Trial1) (code in Trial2)

    It's my trigger:
    Create or replace trigger trg_move_to_trial2
    After Insert on Trial1
    for each row
    Start
    insert into Trial2 (code)
    Select: new.code of Trial1;
    end;
    He compiled, but when I insert a new record (the code) in (Trial1), it shows this error:
    Error report:
    SQL error: ORA-04091: table STU101. TRIAL1 is changing, function of triggering/can not see
    ORA-06512: at "STU101. TRG_MOVE_TO_TRIAL2', line 3
    ORA-04088: error during execution of trigger ' STU101. TRG_MOVE_TO_TRIAL2'
    04091 00000 - "table %s.%s is changing, function of triggering/can not see.
    * Cause: A trigger (or plsql user-defined function that is referenced in)
    This statement) attempted to watch (or modify) a table that has been
    in the Middle being modified by the statement that shot.
    * Action: Rewrite the trigger (or function) so it does not read this table.
    I know matter what it means error, but I did not how to fix the error.

    ..................................................................................................

    I tried to change the (insert after on Trial1) before (insert on Trial1); It worked, but not in a good way. When I insert value in (code Trial1) new and refreshed Trial2 table, just as much as the records I have 2 test they will be duplicated. For example
    Trial2
    code
    111
    222
    333
    when I insert in Trial1
    Trial1
    code
    444
    Trial2 will be:
    code
    111
    222
    333
    444
    444
    444
    can you please tell me how to fix this?

    Kind regards

    Published by: 1002059 on April 23, 2013 17:36

    You should not select Trial1 - you already have data. Simply insert this value.

    Create or replace trigger trg_move_to_trial2
    After insert on Trial1
    for each row
    
    begin
    
    insert into Trial2 (code)
    values (:new.code);
    
    end; 
    

    Kind regards
    David

  • ORA-06503: PL/SQL: function returned no value ORA-06512:

    Hi all

    SQL > set serveroutput on

    SQL > CREATE OR replace FUNCTION qty_value (p_item_id number)

    2 RETURN NUMBER

    3 EAST

    4 v_qty_arrival NUMBER;

    5 BEGIN

    6. SELECT THE CASE SENSITIVE OPTION

    7. WHAT (SUM (b.quantity) - SUM (b.quantity_received)) < = 0 THEN 0

    8 ELSE (SUM (b.quantity) - SUM (b.quantity_received))

    9 END Qty_Arrival

    10 INTO v_qty_arrival

    Po_lines_all 11 a,

    po_line_locations_all 12 b

    13 WHERE a.po_line_id = b.po_line_id

    14 AND a.item_id = p_item_id;

    15 EXCEPTION

    16 THEN THAN OTHERS THEN

    17 v_qty_arrival: = NULL;

    18 RETURN v_qty_arrival;

    19 END qty_value;

    20.

    The function is created.

    SQL >

    SQL > select xxc_qty_arrivale (214960) double

    2.

    Select xxc_qty_arrivale (214960) double

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at the 'APPS '. XXC_QTY_ARRIVALE', line 19

    Back AFTER using the exception block is fine as long as your code actually REACHED the exception block.

    When there are no errors, then your code will not enter the exception block, but you still NEED to return a value, since it is what functions a function wants to return a value, that's what the functions are made for.

    Spot the differences between the following 3 functions. Understand how they work.

    The first function has only a return in the exception block but runs correctly. Result: error, because the back is missing in the code block.

    The second function has a return in the exception block and one in the block of code and runs correctly. Result: no error, because the return is not missing in the code block.

    The third function has a return in the exception block and one in the block of code and is forced into an error. Result: no error, because the return of the exception handler is used (instead of retriggering of the error, which you would normally do).

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7 exception

    8 then than others

    9. can

    10 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    11      --

    12 return 0;

    13      --

    14 end;

    15.

    The function is created.

    SQL > select double myfunc;

    Select double myfunc

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at "GHPLUS. MYFUNC", line 14

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7    --

    8 return 1;

    9    --

    10 exceptional

    11 so that others

    12. can

    13 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    14      --

    15 return 0;

    16      --

    end 17;

    18.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    1

    1 selected line.

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    n number 4;

    5. start

    6 dbms_output.put_line ('in the section of code');

    7 n: = 1/0; -force an error (zero divisor) to join the exception handler

    8    --

    9 return 1;

    10-

    exception 11

    12 so that others

    13. can

    14 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    15      --

    16 return 0;

    17      --

    18 end;

    19.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    0

    1 selected line.

    In the section of code

    In the handler for exception ORA-01476: divisor is equal to zero

    SQL >

  • ORA-12012: error on auto work 2160514 and ORA-06576: not a function name or a valid procedure

    I get these errors after updating, could you please review and advise.

    Errors in the /d04/schval/product/10.2.0/admin/SCHVALS1/bdump/schvals1_j000_8224.trc file:

    ORA-12012: error on auto work 2160513

    ORA-06576: not a function or a procedure valid name

    Sun 23 Jun 19:02:55 CDT 2013

    Errors in the /d04/schval/product/10.2.0/admin/SCHVALS1/bdump/schvals1_j001_8463.trc file:

    ORA-12012: error on auto work 2160514

    ORA-06576: not a function or a procedure valid name

    Sun 23 Jun 19:03:53 CDT 2013

    Errors in the /d04/schval/product/10.2.0/admin/SCHVALS1/bdump/schvals1_j001_8463.trc file:

    ORA-12012: error on auto work 2160514

    ORA-06576: not a function or a procedure valid name

    Sun 23 Jun 19:03:53 CDT 2013

    Errors in the /d04/schval/product/10.2.0/admin/SCHVALS1/bdump/schvals1_j001_8463.trc file:

    ORA-12012: error on auto work 2160513

    ORA-06576: not a function or a procedure valid name

    Sun 23 Jun 19:04:53 CDT 2013

    Errors in the /d04/schval/product/10.2.0/admin/SCHVALS1/bdump/schvals1_j001_8463.trc file:

    ORA-12012: error on auto work 2160514

    ORA-06576: not a function or a procedure valid name

    Sun 23 Jun 19:04:53 CDT 2013

    Errors in the /d04/schval/product/10.2.0/admin/SCHVALS1/bdump/schvals1_j001_8463.trc file:

    ORA-12012: error on auto work 2160513

    ORA-06576: not a function or a procedure valid name

    Checked the DB links are working properly

    DB DB link: where I get these errors

    SQL > select count (*) from [email protected] ;

    COUNT (*)

    ----------

    61233

    the ERP DB

    APPS-VAL1 > select count (*) from [email protected] ;

    COUNT (*)

    ----------

    439

    If I try to run it manually, I am getting error below.

    DBMS_SCHEDULER BEGIN. RUN_JOB ("SCHEDULE_REQUEST_DEQUEUE", TRUE); END;

    *

    ERROR on line 1:

    "ORA-27475: ' XXSAP. SCHEDULE_REQUEST_DEQUEUE' must be work

    ORA-06512: at "SYS." DBMS_ISCHED", line 150

    ORA-06512: at "SYS." DBMS_SCHEDULER', line 441

    ORA-06512: at line 1

    SQL > SELECT master, job_name, error # FROM dba_scheduler_job_run_details

    WHERE error # LIKE '% 6576% ';  2

    OWNER

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

    JOB_NAME

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

    ERROR #.

    ----------

    SYS

    SCHEDULING_LOCATION_UPDATE

    6576

    SYS

    SCHEDULE_REQUEST_DEQUEUE

    6576

    OWNER

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

    JOB_NAME

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

    ERROR #.

    ----------

    SYS

    SCHEDULE_REQUEST_DEQUEUE

    6576

    SQL > select job, what from dba_jobs where broken = 'Y' or chess > 0;

    no selected line

    LOG_DATE                                                                    STATUS                         JOB_NAME

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

    23 JUNE 13 11.37.53.128960 AM - 07:00 IS NOT SCHEDULING_NOTIFICATION_UPDATE

    23 JUNE 13 11.37.54.619584 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.38.53.728264 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.39.53.830833 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.40.53.929791 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.41.54.047578 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.42.53.273320 AM - 07:00 IS NOT SCHEDULING_NOTIFICATION_UPDATE

    23 JUNE 13 11.43.53.529692 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.44.53.628774 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.45.53.739038 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.46.53.848009 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    LOG_DATE                                                                    STATUS                         JOB_NAME

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

    23 JUNE 13 11.47.57.220078 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    23 JUNE 13 11.48.53.329549 AM - 07:00 IS NOT SCHEDULE_REQUEST_DEQUEUE

    3324 selected lines.

    SQL > 1

    1 * Select log_date, status, JOB_NAME from dba_scheduler_job_run_details where status = 'in FAILURE. "

    Thank you

    Vincent

    I suggest you to move (i.e. rebuild) jobs in the XXSAP scheme rather than use the SYS schema.  In this way, you can run "BEGIN DBMS_SCHEDULER. RUN_JOB' to XXSAP correctly.

    Hemant K Collette

  • ORA-06503: PL/SQL: function returned no value

    Hi guys,.
    I wrote a function that returns the number of quarter for a given date.
    Here's the function

    FUNCTION to CREATE or REPLACE fn_get_quarter
    (p_date DATE)
    RETURN NUMBER
    AS
    v_qtr NUMBER;
    BEGIN
    Select TO_CHAR (p_date, 'Q')
    IN v_qtr
    DOUBLE;
    dbms_output.put_line (' it's quarter ' | v_qtr);
    END;

    It compiled without error.

    Here is the test case that I wrote

    DECLARE
    p_date DATE: = TO_DATE('12/22/2009','MM/DD/YYYY');
    v_qtr NUMBER;
    BEGIN
    v_qtr: = fn_get_quarter (p_date);
    END;

    When I run the present, I get the following error.

    ORA-06503: PL/SQL: function returned no value
    ORA-06512: at "GPS_FVO. FN_GET_QUARTER', line 13
    ORA-06512: at line 7

    But surprisingly, I get the result.

    Please suggest and let me know how to get rid of this error and why I get this error.

    Thanks in advance.
    Sam

    RETURN v_qtr;
    should be added after DBMS_OUTPUT

  • HELP to ' SQL error: ORA-00937: not a function of simple-group.

    < p >
    Hello world:

    I have a forum based on oracle 11g database. There two tables: article of thread and the relationship between the two is "one-to-many.

    I want to list the total number of seen of all the discussions in each section, and I write the sql code:

    Select s.secname, sum (sum1) of join of s section

    (select secid, sum1 sum (thrviewednum) of the Group of threads by secid) tt WE s.secid = tt.secid;



    The 'secid' column is the pharmacokinetics of the section table and FK of the table of thread, the "thrviewednum" the number of views of a thread.

    But I get the error:

    Error in the command line: 1 column: 7

    Error report:

    SQL error: ORA-00937: not a function of simple-group

    I can't understand the problem, could someone help me? Thank you.
    < /p >

    Hello

    Use this

    Select s.secname, sum (sum1) of join of s section

    (select secid, sum1 sum (thrviewednum) of the thread by secid group) THE group s.secid tt = tt.secid by s.secname;

    This is because the select statement contains a column that is not part of any group function, so this column must be there in the group by clause

    Concerning

  • ORA-04091: table that postal_address is changing, function of triggering/can not see

    First of all, there are any number of TRIGGERS defined on the table in question in our database.

    The process that we have to do is:

    1. load the addresses from the table.

    2. send the addresses by a routine of standardization.

    3. down any address that has been standardized with success and is not already present.

    So, how can I say ODI 12 c to create a temporary table before doing the multicables?  So far, everything I've tried gets 'flattened' and translates into the same error.

    OR

    Is there another solution?

    Thanks for your help,

    Scott

    I fixed that by creating a second physical + sense + model to this same base (not sure if I need all three, but because of this way to make sure).  This caused ODI generate a SOURCE_GROUP and TARGET_GROUP instead of just a TARGET_GROUP in the physical view.  I had to do everything on the properties of the first element in the target, set the properties on the Oracle of LKM Oracle shoot (DB Link). GLOBAL no matter what option I wanted to (USE_STAGE_TABLE or SELECT_FROM_SOURCE_VIEW).  One thing to do is put the database owner SID in the SOURCE_ACCESS_DB_LINK so it does not create an unnecessary DB link.

    Hope that helps someone else!

  • How to create a delay to a trigger function

    I have a problem, I create a function delay in the timeline with a trigger.

    I want my animation to play every 3 seconds until the next sym.stop and then play after 3 seconds.

    EJ. I have 3 triggers in the timeline panel:

    SYM. Stop (1000)

    SYM. Stop (2000)

    SYM. Stop (3000)

    My idea is to make a delay on all triggers, like this:

    SYM. Stop (1000)

    Delay.Play (2000)

    SYM. Play

    SYM. Stop (2000)

    Delay.Play (2000)

    SYM. Play

    SYM. Stop (3000)

    Delay.Play (2000)

    SYM. Play

    Because I don't know how to create a jQuery function, I pray for your help.

    THX

    You can use these codes for the delay in your triggers

    Put this code at the time 1000 in your time line

    //////////////////////////////////////////////////////////////////

    SYM. Stop();

    clearTimeout() (eventTimer);  Disable the time-out

    var eventTimer = window.setTimeout (function () {sym.play(1000) ()}; 2000); / / 2-second delay can play

    Zaxist

  • Global Temp table to overcome the problem of mutation Trigger

    Hi all. I need to remove a line in a table and thought that I would get around the issue of trigger mutation creating a GTB table. I created 2 different triggers. One is a level line, the other trigger a statement-level trigger.
    The first trigger collects the information required to identify the row I want to delete. It is:
    CREATE OR REPLACE TRIGGER Requisition_Capture
    AFTER UPDATE OF Delivery_Code on Supply_Items
    FOR EACH ROW
    BEGIN
    
      IF :NEW.Delivery_Code = '#' THEN
        INSERT INTO Requisition_Storage
          (Req_Code)
        VALUES
          (:NEW.Requisition_Code);
      END IF;
    END;
    And the second trigger deletes the line:
    CREATE OR REPLACE TRIGGER SUPPLY_ITEM_RESET
    AFTER INSERT ON Requisition_Storage
    
    DECLARE
    
    BEGIN
    
      DELETE FROM Supply_Items r
       WHERE r.Requisition_Code =
             (SELECT t.Req_Code
                FROM Requisition_Storage t, Supply_Items s
               WHERE t.Req_Code = s.Requisition_Code)
         AND r.Order_Qty = 0;
    
    END;
    The GTB's stores following the information that I need to remove the line. :
    -- Create table
    create global temporary table REQUISITION_STORAGE
    (
      req_code VARCHAR2(20)
    )
    on commit delete rows;
    When the Delivery_Code column is updated in the Supply_Item table and the value is reset to ' # ', that I want to capture the Requisition_Code in the Building, so I can run the statement-level trigger and remove the reset line. However, I still have a problem of error mutation. What Miss me?

    The statement-level trigger would need to be a Supply_Items AFTER UPDATE TO for this to work around the problem of trigger mutation. You must ensure that your UPDATE has finished update all rows to be updated before your statement-level trigger executes.

    As has been pointed out, however, the willingness to work around a trigger mutation error almost always indicates that you have a problem of data model. And you are almost always better served by setting the data model to work around the error.

    Justin

  • Go_Item not available in a when-validate-Item trigger function

    Hello. I find that I can't use the Go_Item function in a trigger when-validate-point because it's a small trigger. Is there a common method to pull a trigger that I can use to validate an element (similar to the trigger when-validate-point) is not restricted to where I can use built-ins such as Go_Item, Go_Block, etc... I would use the trigger next-item key, but it does not when a user mouse clicks outside of the question, I need to validate.

    I need to get a validation on an element that identifies if some values were seized. If I find some values, so I need navigate a block "Diary problems" where the user can complete a problem. After leaving the block "Issues Log" I need then to return to the previous box and allow the user continue to enter items. This navigation appear to be limited in the when-validate-Item trigger.

    Any help would be greatly appreciated.

    Yes as Frane explained to create a timer and the fire on WHEN-VALIDATE-item and it expires after your operation as workaround

    or at the level of the blocks ONCE - NEW - ITEM - INSTANCE, you can write something similar

      if :system.trigger_item = 'MYBLOCK.MYITEM' then
             Your code
     end if;
    

    Baig,
    [My Oracle Blog | http://baigsorcl.blogspot.com/]

Maybe you are looking for