error trigger table to strange mutation...

I don't think I should receive a trigger for changing table error...
As my trigger code is just acessnig value from another table... using a function.
When I change my status from open to qualified... this trigger is enabled and fails with the error table to trigger the mutation...
The trigger table mutation should only occur when you query on the same table... The table here are different... so I don't think
trigger of table mutation should shoot...
Here is the code of the trigger
create or replace
TRIGGER "CHESS".leads_after_update
before the update
ON lead
FOR EACH LINE

DECLARE
v_username varchar2 (10);
Number MNO;

BEGIN

-Find user name of the person performing the UPDATE in the table



-Insert record into the audit table

MNO: = 0;
IF: OLD. PRODUCT_tYPE = 'PTSUBSCRIBER' and: new.lead_status = "QUALIFIED" then

-update contact contactType set = 'SUBSCRIBER' where contact_no =: old.contact_nO;
-commit;
-INSERT IN CONTACT_tRANSACTION
-(TRANSACTION, CONTACT_NO, SALESMAN_cODE, ADATE)
-VALUES
-(: old.contact_nO, 'PROSPECTIVE QUALIFIED SUBSCRIBER', SYSDATE,: NEW.) EMPCODE_up);

UPDATE EMP SET MGR = find_qsubt() WHERE LEAD_NO =: NEW. LEAD_NO and mag_no = mid().
ON THE OTHER
IF: OLD. PRODUCT_tYPE = 'PTSUBSCRIBER' and: new.lead_status = "UNQUALIFIED" then

update contact set contactType = 'DISQSUBSCRIBER' where contact_no =: old.contact_nO;

UPDATE EMP SET MGR = find_uqsubt() WHERE LEAD_NO =: NEW. LEAD_NO and mag_no = mid().
END IF;


END IF;



IF: OLD. PRODUCT_TYPE = 'PTADVERTISER' AND: NEW. LEAD_STATUS = "QUALIFIED" then
-INSERTION IN MY VALUES ('ENTER DRAGONADV");
update contact contactType set = 'ADVERTISER', FLAGS = 'Y' where contact_no =: old.contact_nO;
INSERT INTO CONTACT_tRANSACTION
(CONTACT_NO, TRANSACTION, TDATE, SALESMAN_cODE)
VALUES
(: old.contact_nO, 'PROSPECTIVE ADVERTISER QUALIFIED', SYSDATE,: NEW.) EMPCODE_up);

UPDATE EMP SET MGR = find_qadvt() WHERE LEAD_NO =: NEW. LEAD_NO;
ON THE OTHER
IF: OLD. PRODUCT_TYPE = 'PTADVERTISER' AND: NEW. LEAD_STATUS = "UNQUALIFIED" then
-INSERTION IN MY VALUES ('ENTER DRAGONADV");
update contact set contactType = 'DISQADVERTISER' where contact_no =: old.contact_nO;

UPDATE EMP SET MGR = find_uqadvt() WHERE LEAD_NO =: NEW. LEAD_NO;



END IF;
END IF;


END;

This is the error message...
ORA-20505: DML error: p_rowid = 535, p_alt_rowid = LEAD_NO, p_rowid2 =, p_alt_rowid2 is. ORA-04091: table of CHESS. EMP is changing, the trigger/function cannot see ORA-06512: at "CHESS. FIND_QSUBT', line 6 ORA-06512: at "CHESS. LEADS_AFTER_UPDATE', line 23 ORA-04088: error during execution of trigger ' FAILURES. LEADS_AFTER_UPDATE'
Error failed to process row of table DRIVE.
Ok






Function...
create or replace
function
Find_qadvt return number is
mmgrno number (10);
mempno emp.empno%type;
Start
Select mmgrno from emp where mgr = 40 and mag_no = mid() empno;
Select mempno from emp where mgr = mmgrno empno and ename = "QUALIFIED";
Return mempno;
end;

Can someone guide what I'm doing wrong... The emp table is either referenced... too... So I don't think there should be a trigger of table mutation...


Any guidance will be appreciated

Published by: susf on July 9, 2012 01:46

Well, you try to read EMP in the middle of an update of the EMP...

Tags: Database

Similar Questions

  • SQL * Loader - rejected records - error on table ORA-01722: invalid number

    Get the following errors:

    Please tell me where I'm wrong?
    The log file and extracts the data file with the control file is attached.
    Also guide me please how I can download 4900 files at once?

    -------------------------------------
    SQL * Loader: release 11.1.0.7.0 - Production on Fri 14 Oct 03:06:06 2011

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    Control file: sample.ctl
    Data file: Cities.csv
    Bad leadership: Cities.bad
    Discard File: none is specified

    (Allow all releases)

    Number of loading: ALL
    Number of jump: 0
    Authorized errors: 50
    Link table: 64 lines, maximum of 256000 bytes
    Continuation of the debate: none is specified
    Path used: classics

    Table CITY, loaded from every logical record.
    Insert the option in effect for this table: INSERT

    Column Position Len term Encl. Datatype name
    ------------------------------ ---------- ----- ---- ---- ---------------------
    FIRST ID *, CHARACTER
    35. ACCORDING TO NAME, ' CHARACTER
    COUNTRYCODE 3, ' CHARACTER
    THE NEXT POPULATION * CHARACTER WHT

    Sheet 1: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 2: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 3: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Folder 4: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 5: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 6: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 7: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 8: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 9: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Case 10: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Factsheet 11: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 12: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 13: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 14: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 15: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 16: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 17: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 18: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 19: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 20: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 21: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Account 22: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 23: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record number of 24: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 25: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 26: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 27: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 28: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 29: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 30: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record of 31: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    • Statement 32: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 33: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Page 34: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 35: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 36: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 37: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 38: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 39: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 40: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 41: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Page 42: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 43: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 44: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 45: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    • Statement 46: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 47: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 48: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 49: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Page 50: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 51: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number


    NUMBER of MAXIMUM ERRORS EXCEEDED - above the statistics reflect partial performance.

    CITY table:
    0 rows successfully loaded.
    51 lines not filled due to data errors.
    0 rows not loading because all WHEN clauses were failed.
    0 rows not populated because all fields are null.


    The space allocated to bind table: 35840 bytes (64 lines)
    Bytes of read buffer: 1048576

    Total logical records ignored: 0
    Total logical records read: 64
    Total rejected logical records: 51
    Total logical records ignored: 0

    Run started on Fri 14 Oct 03:06:06 2011
    Run finished Fri Oct 14 03:06:12 2011

    Time was: 00:00:06.18
    Time processor was: 00:00:00.03



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

    my control file (sample.ctl):

    Load data infile 'Cities.csv '.
    in the town of table
    fields completed by «,»
    (external id integer,
    char (35) name box by ' ', '
    CountryCode tank (3) box by ' ', '
    external population integer terminated by '\n '.
    )

    my data (Cities.csv) file (it contains 4900 documents, but I show here just 4 records for ease)

    3830, "Virginia Beach", "USA", 425257
    3831, 'Atlanta', 'USA', 416474
    3832, "Sacramento", "USA", 407018
    3833, 'Oakland', 'USA', 399484


    Thanks in advance!

    Watch when I have a little change your database as follows

    1,'Kabul','AFG',1780000
    2,'Qandahar','AFG','237500'
    3,'Herat','AFG','186800'  
    

    I got the same error (last 2 rows rejected for the same number invalid error)

    mhouri > select * from cities;
    
            ID NAME                                COU POPULATION
    ---------- ----------------------------------- --- ----------
             1 Kabul                               AFG    1780000
    
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Oct 14 10:38:06 2011
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Control File:   cities.ctl
    Data File:      cities.dat
      Bad File:     cities.bad
      Discard File:  none specified
    
     (Allow all discards)
    
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    
    Table CITIES, loaded from every logical record.
    Insert option in effect for this table: INSERT
    
       Column Name                  Position   Len  Term Encl Datatype
    ------------------------------ ---------- ----- ---- ---- ---------------------
    ID                                  FIRST     *   ,       CHARACTER
    NAME                                 NEXT    35   ,    '  CHARACTER
    COUNTRYCODE                          NEXT     3   ,    '  CHARACTER
    POPULATION                           NEXT     *  WHT      CHARACTER            
    
    Record 4: Rejected - Error on table CITIES, column ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 2: Rejected - Error on table CITIES, column POPULATION.
    ORA-01722: invalid number
    
    Record 3: Rejected - Error on table CITIES, column POPULATION.
    ORA-01722: invalid number
    
    Table CITIES:
      1 Row successfully loaded.
      3 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    
    Space allocated for bind array:                  35840 bytes(64 rows)
    Read   buffer bytes: 1048576
    
    Total logical records skipped:          0
    Total logical records read:             4
    Total logical records rejected:         3
    Total logical records discarded:        0
    
    Run began on Fri Oct 14 10:38:06 2011
    Run ended on Fri Oct 14 10:38:06 2011
    
    Elapsed time was:     00:00:00.23
    CPU time was:         00:00:00.09
    

    Value of the population within the data file must be a number

    Best regards

    Mohamed Houri

  • FRM-40735: ON-ERROR trigger fired unhandle exception ORA-06508

    Hello

    I am new to your oracle. Please help me, I got below error while run Client/Server Oracle form generator. Compilation of form completed successfully.

    FRM-40735: ON-ERROR trigger fired unhandle exception ORA-06508

    How to solve this error.

    Thank you
    Concerning
    GSM

    GSM,

    But implementation of Client/Server, Web, or debug is giving below error:

    Could you elaborate on that? Is your application deployed via the Web or Client/Server? Do you use your form in these modes of the Forms Builder? If so, the error is appropriate because you do not have your configuration of the environment Forms Builder correctly for your form can find the resource files it needs when it launches.

    There is no stored procedure executed ORA - 04067:not, 'APP_STANDARD'

    APP_STANDARD is a form of model used by the Oracle Enterprise Business Suite (EBS). The APP_STANDARD.fmb form is the source of objects subclassed in a form of EBS. Based on the error you get, assume that you create a form for use with the EBS. Clearly your deployment environment is not configured to correctly refernce all the resource files for each of the modes EBS. EBS forms typically cannot be run directly from the forms generator. It is best to run and troubleshoot the shape on a development of EBS Instance.

    If you develop forms of EBS, you might want to take some time and consider the following:

    Oracle Applications Documentation library. Select your version of EBS and then do scroll to the section of the standards and review the following documents:


    • The Oracle Applications Developer's Guide
    • Oracle Applications Interface standards user for forms-based products
    • Oracle Application Framework Customization Guide

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • ORA-24381: error (s) table DML

    Hello

    I encountered error during the mya test. The script run through several cases, until it encounters this error ORA-24381: error (s) table DML.

    What could be the reason for this and if someone can give an idea to solve this problem.

    Collect in bulk has been used with a limit of 1000.
    I used dblink to the access database.

    Thanks in advance.

    Documentation says it it all: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2201

    Kind regards
    Rob.

  • 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;
    
  • Trigger is getting a mutation

    Hello gurus,
    i have two tables  MAIN_TB (main table),MAIN_HT (main table history)
    
    MAIN_TB CONSIST OF 
    
    C_CODE  VARCHAR2;
    OCC_NO NUMBER;
    can_cont  char(1);
    CONT_NO VARCHAR2;
    LOG  OB_LOG;
    
    AND 
    
    MAIN_HT CONSIST OF 
    
    HT_OCC_NO  NUMBER;
    C_CODE  VARCHAR2
    OCC_NO NUMBER;
    can_cont char(1);
    CONT_NO VARCHAR2;
    LOG  OB_LOG;
    now my is - it table HT must get inserted each time that the occ_no in TB is updated when TB isnull table and table can_cont HT should not be inserted when can_cont of tuberculosis is not null; but when I try this my start trigger how to stop the mutation which is at - it differently than i cud use to develop my trigger

    My trigger is
    CREATE OR REPLACE TRIGGER main_tr
       AFTER INSERT OR UPDATE OF occ_no
       ON main_tb
       REFERENCING NEW AS NEW OLD AS OLD
       FOR EACH ROW
    DECLARE
       ht_occ_no      NUMBER := 0;
       no_of_update   NUMBER := 0;
    BEGIN
       BEGIN
          SELECT MAX (nvl (ht_occ_no, 0))
            INTO ht_occ_no
            FROM main_ht
           WHERE c_code = :NEW.c_code AND cont_no = :NEW.cont_no;
       EXCEPTION
          WHEN OTHERS
          THEN
             raise_application_error
                             (-20001,
                                 'Error While Inserting Into MAIN_ht  In MAIN_TR'
                              || SQLERRM
                             );
       END;
    
       BEGIN
          SELECT mtb.LOG.no_of_update
            INTO no_of_update
            FROM main_tb mtb
           WHERE mtb.c_code = :OLD.c_code
             AND mtb.cont_no = :OLD.cont_no
             AND mtb.can_cont IS NULL;
       EXCEPTION
          WHEN NO_DATA_FOUND
          THEN
             no_of_update := 0;
       END;
    
       IF UPDATING
       THEN
          IF no_of_update = 0
          THEN
             ht_occ_no := ht_occ_no + 1;
          END IF;
       END IF;
    
       IF INSERTING
       THEN
          IF no_of_update = 0
          THEN
             RETURN;
          END IF;
       END IF;
    
       BEGIN
          INSERT INTO main_ht
                      (ht_occ_no, c_code, occ_no, can_cont, cont_no, LOG
                      )
               VALUES (ht_occ_no, :OLD.c_code:OLD.occ_no, can_cont, cont_no, LOG
                      );
       EXCEPTION
          WHEN OTHERS
          THEN
             raise_application_error
                             (-20001,
                                 'Error While Inserting Into MAIN_ht  In MAIN_TR'
                              || SQLERRM
                             );
       END;
    END main_tr;
    /
    How can I stop the outbreak of the mutation and how do I get my result with using the pragma autonomus transaction?

    Thank you and best regards,
    friend

    Edited by: most wanted! on February 5, 2012 22:49

    Not tested...

    CREATE OR REPLACE TRIGGER main_tr
       AFTER INSERT OR UPDATE OF occ_no
       ON main_tb
       REFERENCING NEW AS NEW OLD AS OLD
       FOR EACH ROW
    DECLARE
       ht_occ_no      NUMBER := 0;
       no_of_update   NUMBER := 0;
    BEGIN
       BEGIN
          SELECT NVL (MAX (ht_occ_no), 0)
            INTO ht_occ_no
            FROM main_ht
           WHERE c_code = :NEW.c_code AND cont_no = :NEW.cont_no;
       EXCEPTION
          WHEN OTHERS
          THEN
             raise_application_error
                             (-20001,
                                 'Error While Inserting Into MAIN_ht  In MAIN_TR'
                              || SQLERRM
                             );
       END;
    
       IF UPDATING
       THEN
          IF :OLD.no_of_update = 0 AND :OLD.mtb.can_cont ='n'
          THEN
             ht_occ_no := ht_occ_no + 1;
    
          END IF;
           BEGIN
          INSERT INTO main_ht
                      (ht_occ_no, c_code, occ_no, can_cont, cont_no, LOG
                      )
               VALUES (ht_occ_no, :OLD.c_code:OLD.occ_no, can_cont, cont_no, LOG
                      );
       EXCEPTION
          WHEN OTHERS
          THEN
             raise_application_error
                             (-20001,
                                 'Error While Inserting Into MAIN_ht  In MAIN_TR'
                              || SQLERRM
                             );
       END;
       END IF;
    
    END main_tr;
    
  • 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.

  • Trigger appeared with strange name

    Oracle 11g

    All of a sudden, we get this error when refreshing a certain table:
    ORA-04098: trigger ' AM_DEV. BIN$ our4yawU287gQBMKOxY2NA == $0 ' is not valid and does not re-validation

    I see this trigger listed in user_triggers; the deletion fails:
    SQL > drop trigger ' BIN$ our4yawU287gQBMKOxY2NA == $0 ';
    "Drop trigger ' BIN$ our4yawU287gQBMKOxY2NA == $0"
    *
    ERROR on line 1:
    ORA-04070: invalid trigger name

    I see too similar named triggers on the other tables.

    What are they and how can I get rid of them?

    Well, if this isn't in the recyclebin (although its name suggests it is) and you will have to drop it... put the name in quotation marks to preserve the case...

    drop trigger "BIN$our4yawU287gQBMKOxY2NA==$0";
    
  • epengs.dB (ENG) + error CREATE TABLE PS_1099C_CUST_DATA


    PT 8.54.10

    FSCM 9.2 (picture 13)

    SQL Server 2008 (64-bit)

    We get below error when we are in the stages of the creation of the DB via DM scripts.

    Started the: Tue Nov 17 02:10:54 2015
    Release of Data Mover: 8.54.10
    Database: FSDMO92 (ENG)
    Input file: E:\FSDMO92\data\epengs.db (ENG)
    Import 1099C_CUST_DATA
    Create Table 1099C_CUST_DATA
    -SQL error. Position of the error: 0 return: 8601 -.


    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Column, parameter, or variable #4: could not find the PSDATE data type.
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Instructions could not be prepared. (SQLSTATE 37000) 8180

    CREATE TABLE PS_1099C_CUST_DATA (CUST_ID varchar (15) NOT NULL, TIN varchar (20) NOT NULL, TAXPAYER_ID varchar (14) is NOT NULL, ASOF_DATE PSDATE NULL, decimal ENTRY_AMT (26, 3) NOT NULL, decimal INTEREST_EXPENSE (26, 3) NOT NULL, Name1 varchar (40) NOT NULL, NAME2 varchar (40) NOT NULL, NOT NULL of the varchar (55), of ADDR_LN1 ADDR_LN2 varchar (55) NOT NULL) , ADDR_LN3 varchar (55) NOT NULL, ADDR_LN4 varchar (55) NOT NULL, CITY varchar (30) NOT NULL, NOT NULL of the varchar (6) State, POSTAL varchar (12) NOT NULL, TEL varchar (24) is NOT NULL, NAME varchar (50) NOT NULL, Name3 varchar (40) NOT NULL, name4 varchar (40) NOT NULL, CITY3 varchar (30) NOT NULL, Address1 varchar (55) NOT NULL , State3 varchar (6) NOT NULL, POSTAL...
    Error: Unable to process create statement for 1099C_CUST_DATA
    Ending: Tue Nov 17 02:10:56 2015
    Unsuccessful end

    Cannot find the data type PSDATE comes here.  Looks like one of the required scripts has not been executed.  It has been long since I am on a site of SQL Server, but I understand the substance of this issue.  PeopleSoft creates a customized in SQL Server PSDATE data type which is an extension of the date format.

    Rather than to point you to the script, I suggest you go back and find where this prerequisite is necessary and make sure that you are not lacking in any other required component.

  • Publication of default due to the error creating table _mungo

    Hello

    I'm trying to reflect the types of assets for the development of the Test environment. The mirror operation fails with the following error:

    [13:07:44.924 2014-03-04] [CS. DB] [ERROR] SQLException statement: CREATE TABLE XXXXXXX_C_Mungo (id Number (38) PRIMARY KEY NOT NULL, cs_ownerid Number (38) NOT NULL, NULL Number (38), urlvalue NULL varchar (128), stringvalue NULL varchar (2000), intvalue NUMBER (10) NULL, NULL NUMBER(38, 10), moneyvalue, NULL, TIMESTAMP NULL, NULL Number datevalue (38), text NULL CLOB, cs_attrid Number (38) NOT NULL assetvalue cs_assetgroupid floatvalue) cs_islegal char (1)
    Blobvalue NULL, NULL Number (38), cs_filterid NULL Number (38), cs_ordinal NUMBER (38, 10) NULL)
    java.sql.SQLSyntaxErrorException: ORA-02263: need to specify the data type for this column.

    After reviewing the request that I discovered that moneyvalue is missing from column data type. I checked the value of cc.money in gator.ini and it is set to the default NUMERIC value (20.3). I ran the query in the help tool to provide the data type for the column moneyvalue and it works very well.

    Version is 7.5 patch4

    No idea where it is a failure?

    Thank you

    Harish

    Hi Harish,

    What is your cc.numeric value in futuretense.ini on a server?

    Have you tried comparing the two systems differences *.ini files? (Easiest way to compare them is to sort the content first, and then use a diff of program like winmerge or diff.)

    Kind regards

    Stephan.

  • character string buffer too small error in table form

    Hi people,

    One of my tabular forms suddenly stopped working suddenly after 3 months of work perfectly. Then I ran into debugging and looks like something bad went my LOV like below:
         0.16968     0.00328     ...Execute Statement: begin begin SELECT TIME_DISPLAY D, TIME_RETURN R bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value FROM TS_HOURS ORDER BY 2; end; end;     4     
    8
         0.17292     0.03912     ...Execute Statement: begin begin select /*+ cardinality(t 10) */ disp, val bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from table(wwv_flow_utilities.get_temp_lov_data(2)) t order by insert_order, disp; end; end;     4     
    100
         0.21211     0.00224     report error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I have looked around and I saw a few others with the same problems but nothing that has like mine. Could someone please help me to find what is the problem? Thank you.

    I use Apex 4.1.1

    Hello

    the LOVs are displayed as a row okay? I wonder if it's some kind of a problem with the tabular forms?

    Concerning
    André

  • Checking level trigger table

    For the life of me, I can't understand why it does not work:
    SQL Developer Version 3.2.20.09


    CREATE OR REPLACE
    relaxation TRG_PROP_AUDIT

    AFTER insert or update or delete on PROP_BOOK_SI
    for each line

    Start
    IF THE INSERTION
    INSERT INTO PROPERTY_AUDIT
    (AUDIT_DATE, ENTERED_BY, OPERATION)
    VALUES
    (AUDIT_DATE, ENTERED_BY, "INSERT");

    ELSIF update then
    INSERT INTO PROPERTY_AUDIT
    (AUDIT_DATE, ENTERED_BY, OPERATION)
    VALUES
    (AUDIT_DATE, ENTERED_BY, "UPDATE");

    ELSIF deletion then
    INSERT INTO PROPERTY_AUDIT
    (AUDIT_DATE, ENTERED_BY, OPERATION)
    VALUES
    (AUDIT_DATE, ENTERED_BY, 'DELETE');


    end if;
    end TRG_PROP_AUDIT;

    I get this error:
    Error (3,1): PL/SQL: statement ignored
    Error (6.22): PL/SQL: ORA-00984: column not allowed here
    Error (9.1): PL/SQL: statement ignored
    Error (12,22): PL/SQL: ORA-00984: column not allowed here
    Error (15.1): PL/SQL: statement ignored


    What I am doing wrong? I've studied this extensively on the web, and apparently you are not allowed to enter the column names in the expression [VALUES]. So, how am I supposed to put this information in the appropriate columns? I'm so confused right now. I'd appreciate any help...

    Hello

    I don't know that this is the right forum for your message.
    Next time post in the forum SQL and PL/SQL [url https://forums.oracle.com/forums/forum.jspa?forumID=75]

    But in any case you cannot use the column name directly in a trigger.
    You must use: new or: old as a prefix as follows:

    CREATE OR REPLACE
    trigger TRG_PROP_AUDIT
    
    AFTER insert or update or delete on PROP_BOOK_SI
    for each row
    
    begin
    IF INSERTING THEN
    INSERT INTO PROPERTY_AUDIT
    (AUDIT_DATE, ENTERED_BY, OPERATION)
    VALUES
    (:new.AUDIT_DATE, :new.ENTERED_BY, 'INSERT');
    
    ELSIF updating then
    INSERT INTO PROPERTY_AUDIT
    (AUDIT_DATE, ENTERED_BY, OPERATION)
    VALUES
    (:new.AUDIT_DATE, :new.ENTERED_BY, 'UPDATE');
    
    ELSIF deleting then
    INSERT INTO PROPERTY_AUDIT
    (AUDIT_DATE, ENTERED_BY, OPERATION)
    VALUES
    (:old.AUDIT_DATE, :old.ENTERED_BY, 'DELETE');
    end if;
    end TRG_PROP_AUDIT;
    

    Kind regards
    Erik-jan

  • ORA-01031 error creating table

    I use DB 11g on Wn 2008 Server 64 bit. I run the following creation script:

    CREATE THE TABLE SUPPCHAIN. COUNTRIES (COUNTRY_ID, REGION_ID NUMBER NOT NULL, C
    COUNTRY VARCHAR2 (32) NOT NULL, CODE CHAR (2) NOT NULL, NUMBER OF THE POPULATION, THE AREA N
    UMBER, FXCODE CHAR (3), VARCHAR2 (32) OF CURRENCY, RATES FLOAT (126), PRIMARY KEY (COUN
    TRY_ID) VALIDATE, VALIDATE UNIQUE (COUNTRY), INVALID (CODE) UNIQUE, FOREIGN
    KEY (REGION_ID) REFERS TO SUPERAD. REGION (REGION_ID) VALIDATE)

    Get the following error

    ERROR on line 1:
    ORA-01031: insufficient privileges

    I know it has to do with foreign key references, but I do not know what privileges to set to allow the above run correctly.

    I put CREATE TABLE privileges for user SUPPCHAIN. User SUPERAD also has these privileges and the SYSDBA. So what other privileges should I create?


    Thanks, J

    Jay wrote:
    I use DB 11g on Wn 2008 Server 64 bit. I run the following creation script:

    CREATE THE TABLE SUPPCHAIN. COUNTRIES (COUNTRY_ID, REGION_ID NUMBER NOT NULL, C
    COUNTRY VARCHAR2 (32) NOT NULL, CODE CHAR (2) NOT NULL, NUMBER OF THE POPULATION, THE AREA N
    UMBER, FXCODE CHAR (3), VARCHAR2 (32) OF CURRENCY, RATES FLOAT (126), PRIMARY KEY (COUN
    TRY_ID) VALIDATE, VALIDATE UNIQUE (COUNTRY), INVALID (CODE) UNIQUE, FOREIGN
    KEY (REGION_ID) REFERS TO SUPERAD. REGION (REGION_ID) VALIDATE)

    Get the following error

    ERROR on line 1:
    ORA-01031: insufficient privileges

    I know it has to do with foreign key references, but I do not know what privileges to set to allow the above run correctly.

    I put CREATE TABLE privileges for user SUPPCHAIN. User SUPERAD also has these privileges and the SYSDBA. So what other privileges should I create?

    Thanks, J

    GRANT REFERENCES ON SUPERAD. SUPPCHAIN REGION;

  • the impdp error: ORA-02374: conversion error loading table

    Hello

    I'm trying to convert the WE8ISO8859P1 character set AL32UTF8 using expdp/impdp. for this I first convert WE8ISO8859P1 WE8MSWIN1252 in source DB to get rid of the data "lossy." I created new (target) database with character set AL32UTF8 and nls_length_semantics = "CHAR" and donated all the tablespaces as source DB with auoexend. I took a full export (expdp) source DB excluding the TABLESPACE, STATISTICS, INDEXES, CONSTRAINTS, REF_CONSTRAINT and imported using impdp to target DB. I found error below in the import log file:

    ORA-02374: error loading «SCTCVT» conversion table "" SPRADDR_CVT ".
    ORA-26093: size of the input data column (44) exceeds the maximum input size (40)
    ORA-02372: row data: CONVERT_STREET_LINE1: 0 X '20202020202020202020202020202020202020202020202020'

    I checked with a select query on the two DBs with inferior results.

    Source D:
    04:58:42 SQL > select count (*) of "SCTCVT". "" SPRADDR_CVT ";

    COUNT (*)
    --------
    74553

    target DB:
    04: 59:24 SQL > select count (*) of "SCTCVT". "" SPRADDR_CVT ";

    COUNT (*)
    --------
    74552


    Please suggest me a solution to this.


    Thank you and best regards.

    Edited by: user12045167 may 9, 2011 22:39

    I think that, if you change your column of the table length CONVERT_STREET_LINE1 this help you.

    alter table "SCTCVT"."SPRADDR_CVT" modify (CONVERT_STREET_LINE1 varchar2(50));
    
  • Error creating table with clusters

    Hello
    I tried the following
    CREATE CLUSTER emp_dept (deptno NUMBER(3))
    Cluster is created

    Then I tried to create the table with the cluster above but giving error:
    create table emp10 (ename char(5),deptno number(2) )cluster emp_dept(deptno);
    The error is:
    ORA-01753 column definition incompatible with clustered column definition
    Could you please help me in this

    Your cluster is based on a NUMBER data type (3), while the emp10 table has a deptno column with a data type of NUMBER (2).

Maybe you are looking for