ORA-01779 during insertion

Hi all

Oracle database version: 10.2.0.4.0

When inserting into the table, I get this error below.
SQL> desc org_officer
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OFFICER_STATUS                                     VARCHAR2(10)
 OFFICER_RANK                                       NUMBER(3)
 OFFICER_ACTIVE                                     VARCHAR2(1)
 PERSON_ID                                          NUMBER(10)
 BIOGRAPHICAL_INFO                                  VARCHAR2(4000)
 OFFICER_ID                                         NUMBER(19)
 ORG_ID                                             NUMBER(19)

SQL> desc BID_XML_DATA_BK
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 XML_DATA                                           SYS.XMLTYPE(XMLSchema "http:
                                                    //www.schemas.th.com/IntBID03" Element "Inte
                                                    grationBID") STORAGE Object-
                                                    relational TYPE "Integration
                                                    BID1004_T"
 BID_INSERT_STAMP                                   DATE
 RN                                                 NUMBER(5)
 ORG_ID                                             NUMBER(19)

insert into org_officer                                                        
select  b.officer_status,  b.officer_rank, b.officer_active, b.person_id,      
b.biographical_info, b.officer_id, a.org_id from bid_xml_data_bk a,            
xmltable                                                                       
(xmlnamespaces(default 'http://www.schemas.th.com/IntBID03'),      
'IntegrationBID/Organization'                                                  
passing a.xml_data                                                             
columns                                                                        
org_id   number(19) path '@ID',                                                
data_fragments xmltype path 'OfficerInformation'                               
) key_map,                                                                     
xmltable                                                                       
('OfficerInformation/Officer'                                                  
passing key_map.data_fragments                                                 
columns                                                                        
officer_status VARCHAR2(10) path '@Status',                                    
officer_rank number(3) path '@Rank',                                           
officer_active varchar2(1) path '@Active',                                     
person_id  number(10) path 'Person/@ID',                                       
officer_id number(19) path '@ID',                                              
biographical_info varchar2(4000) path 'BiographicalInformation/Text'           
) b; 
insert into org_officer
*
ERROR at line 1:
ORA-01779: cannot modify a column which maps to a non key-preserved table
Could someone help me please to insert. I am able to select and create a new table by using this statement select but not possible to insert using this select statement.

NOTE: org_officer is not a view. And there is no constrants in the two tables.
SQL> select dbms_metadata.get_ddl('TABLE','BID_XML_DATA_BK','COMMON') from dual;

DBMS_METADATA.GET_DDL('TABLE','BID_XML_DATA_BK','COMMON')
--------------------------------------------------------------------------------

  CREATE TABLE "COMMON"."BID_XML_DATA_BK"
   (    "XML_DATA" "SYS"."XMLTYPE" ,
        "BID_INSERT_STAMP" DATE,
        "RN" NUMBER(5,0),
        "ORG_ID" NUMBER(19,0)
   ) XMLTYPE COLUMN "XML_DATA" XMLSCHEMA "http://ww
w.schemas.th.com/IntBID03" E
LEMENT "IntegrationBID" ID 4691
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MIN
EXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BU
FFER_POOL DEFAULT)
  TABLESPACE "COMMON_DATA"


SQL> select dbms_metadata.get_ddl('TABLE','BID_XML_DATA_BK','COMMON') from dual;

DBMS_METADATA.GET_DDL('TABLE','BID_XML_DATA_BK','COMMON')
--------------------------------------------------------------------------------

  CREATE TABLE "COMMON"."BID_XML_DATA_BK"
   (    "XML_DATA" "SYS"."XMLTYPE" ,
        "BID_INSERT_STAMP" DATE,
        "RN" NUMBER(5,0),
        "ORG_ID" NUMBER(19,0)
   ) XMLTYPE COLUMN "XML_DATA" XMLSCHEMA "http://ww
w.schemas.th.com/IntBID03" E
LEMENT "IntegrationBID" ID 4691
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MIN
EXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BU
FFER_POOL DEFAULT)
  TABLESPACE "COMMON_DATA"
-Yasser

Published by: YasserRACDBA on April 13, 2010 15:48

Done next assistance

ORA-01779, impossible to get right for

forget the note == false xmltype ==

Published by: Marco Gralike, October 20, 2010 20:04

Tags: Database

Similar Questions

  • ERROR "ora-01422" during insertion in the table?

    Hello

    I have created the dynamic action of PL/SQL to insert data but founded by page_item

    
    
     declare 
    x_found_pages number;
    x_auth_id number;
    x_user_id number;
     begin
     x_user_id := :P41_USR_ID; -- this is my page_item _____ successful run When change it to number value .. !
    
    
    
    
          select count(V_APP_PAGES.PAGE_ID) into x_found_pages
          from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES 
          where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID
          and  V_AUTH_DTL.USR_ID = x_user_id;
       
          select T_AUTH.ID into x_auth_id 
          from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH 
          where T_AUTH_DTL.AUTH_ID=T_AUTH.ID
          and T_AUTH.USR_ID = x_user_id;
    
    
    -- Checking...? 
      if x_found_pages > 0 then
    
            for i in (select V_APP_PAGES.PAGE_ID
               from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES 
               where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID
               and  V_AUTH_DTL.USR_ID = x_user_id)
        
      loop
      insert into T_AUTH_DTL (AUTH_ID,PAGE_ID) values (x_auth_id,i.PAGE_ID);
      end loop;
    
        end if;
    
     end;
    
    
    
    

    Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...

    Thank you...

    AMR Abdeen wrote:

    I have created the dynamic action of PL/SQL to insert data but founded by page_item

    1. declare
    2. number of x_found_pages;
    3. number of x_auth_id;
    4. number of x_user_id;
    5. Start
    6. x_user_id: =: P41_USR_ID; -It is my page_item _ successfully performed when change to value the number...!
    7. SELECT count (V_APP_PAGES. Page_id) in x_found_pages
    8. of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
    9. where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
    10. and V_AUTH_DTL. USR_ID = x_user_id;
    11. Select T_AUTH.ID from x_auth_id
    12. of T_AUTH_DTL T_AUTH_DTL, T_AUTH T_AUTH
    13. where T_AUTH_DTL. AUTH_ID = T_AUTH.ID
    14. and T_AUTH. USR_ID = x_user_id;
    15. -Checking...?
    16. If x_found_pages > 0 then
    17. I'm in (select V_APP_PAGES. PAGE_ID
    18. of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
    19. where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
    20. and V_AUTH_DTL. USR_ID = x_user_id)
    21. loop
    22. insert into T_AUTH_DTL (AUTH_ID, PAGE_ID) values (x_auth_id, i.PAGE_ID);
    23. end loop;
    24. end if;
    25. end;

    Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...

    The error is explicit:

    ORA-01422: exact fetch returns more than number of lines

    Cause: The exact extraction specified number is less than the rows returned.

    Action: Rewrite the query or change the number of rows requested

    This would imply the query in line 16 as County dissociated in the previous one will always return only one row.

    Run

    select T_AUTH.ID into x_auth_id
    from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH
    where T_AUTH_DTL.AUTH_ID=T_AUTH.ID
    and T_AUTH.USR_ID = :x_user_id
    

    in the workshop of SQL by using the P41_USR_ID value in the variable link to find out how many rows it returns.

    It is likely that the entire block can be replaced by a single INSERT statement. If you provide instructions CREATE TABLE, INSERT statements to create sample data and a clear definition of the requirements that we try to do.

    What is the point of the inclusion of tables aliases that are exactly the same as the names of the tables?

  • Errors during insertion and update form using the VIEW.

    Here is my opinion:

    CREATE OR REPLACE FORCE 
    VIEW  "SH_ADD_EMPLOYEES_VW" ("EMP_ID", "DEPT_ID", "JOB_DESC_ID", "EMPNO", "EMP_FIRST", "EMP_LAST", "USER_NAME", "USER_INI", "DEPTNO", "DEPT_DESC", "ROLES_ID", "ADMIN", "CREATES", "APPROVES", "QUALITY", "CUST_SVC", "SH_LOCAL", 
    "SH_OFFICE", "SYSTEM") 
    AS
      select
    "SH_EMPLOYEES"."EMP_ID" as "EMP_ID",
    "SH_EMPLOYEES"."DEPT_ID" as "DEPT_ID",
    "SH_EMPLOYEES"."JOB_DESC_ID" as "JOB_DESC_ID",
    "SH_EMPLOYEES"."EMPNO"  as "EMPNO",
    "SH_EMPLOYEES"."EMP_FIRST" as "EMP_FIRST",
    "SH_EMPLOYEES"."EMP_LAST" as "EMP_LAST",
    "SH_EMPLOYEES"."USER_NAME" as "USER_NAME",
    "SH_EMPLOYEES"."USER_INI" as "USER_INI",
    "SH_EMPLOYEES"."DEPTNO" as "DEPTNO",
    "SH_EMPLOYEES"."DEPT_DESC" as "DEPT_DESC",
    "DOC_ROLES"."ROLES_ID" as "ROLES_ID",
    "DOC_ROLES"."ADMIN" as "ADMIN",
    "DOC_ROLES"."CREATES" as "CREATES",
    "DOC_ROLES"."APPROVES" as "APPROVES",
    "DOC_ROLES"."QUALITY" as "QUALITY",
    "DOC_ROLES"."CUST_SVC" as "CUST_SVC",
    "DOC_ROLES"."SH_LOCAL" as "SH_LOCAL",
    "DOC_ROLES"."SH_OFFICE" as "SH_OFFICE",
    "DOC_ROLES"."SYSTEM" as "SYSTEM"
    FROM "SH_EMPLOYEES" "SH_EMPLOYEES", "DOC_ROLES" "DOC_ROLES"
    where "SH_EMPLOYEES"."EMP_ID" = "DOC_ROLES"."EMP_ID"
    /
    
    

    Here's my trigger (note - I do not use the EXCEPTION clause or (declaration of it) because it throws an error msg = >: 'This is my message'.) Here, any help would be great as well.)

    CREATE OR REPLACE TRIGGER bi_ADD_EMPLOYEES_VW
    INSTEAD OF insert ON SH_ADD_EMPLOYEES_vw
    for each row
    declare
    duplicate_info EXCEPTION;
    PRAGMA EXCEPTION_INIT(duplicate_info, -00001);
    begin
    insert into SH_EMPLOYEES
    (EMP_ID, DEPT_ID, JOB_DESC_ID, EMPNO, EMP_FIRST, EMP_LAST, USER_NAME, USER_INI, DEPTNO, DEPT_DESC)
    values
    (:new.EMP_ID, :new.DEPT_ID, :new.JOB_DESC_ID, :new.EMPNO, :new.EMP_FIRST, :new.EMP_LAST, :new.USER_NAME, :new.USER_INI, :new.DEPTNO, :new.DEPT_DESC);
    insert into DOC_ROLES 
    (ROLES_ID, ADMIN, CREATES, APPROVES, QUALITY, CUST_SVC, SH_LOCAL, SH_OFFICE, SYSTEM)
    VALUES (
    :new.ROLES_ID, :new.ADMIN, :new.CREATES, :new.APPROVES, :new.QUALITY, :new.CUST_SVC, :new.SH_LOCAL, :new.SH_OFFICE, :new.SYSTEM);
    EXCEPTION
     WHEN duplicate_info THEN
      RAISE_APPLICATION_ERROR (
       num=> -20107
       msg=> 'Duplicate employee');
    END bi_ADD_EMPLOYEES_VW;
    /
    
    

    ERROR ON UPDATE:

    ORA-20505: DML error: p_rowid = 1001,.
    p_alt_rowid = EMP_ID, p_rowid2 = 2, p_alt_rowid2 = ROLES_ID. ORA-01779: cannot change
    a column that is mapped to a table not preserved key

    ERROR WHEN INSERTING:

    ORA-01400: cannot insert NULL in
    ("SPICE_HUNTER1". "" "" SH_EMPLOYEES '. "" EMP_ID") ORA-06512: at
    "SPICE_HUNTER1. BI_SH_ADD_EMPLOYEES_VW', line 3 ORA-04088: error during execution
    relaxing ' SPICE_HUNTER1. BI_SH_ADD_EMPLOYEES_VW' ORA-06512: at
    'SYS. WWV_DBMS_SQL', line 549 ORA-06512: at "APEX_040000.WWV_FLOW_DML", line 1121
    ORA-22816: feature not supported with RETURNING clause

    Error Impossible to process line on table SH_ADD_EMPLOYEES_VW

    I see you manage emp_id is null, you must assign a value if null sequence... This column cannot be null, where the error, and "Edit" a column of this table the DML to this id value.

  • Error ORA-01779: table preserved key not on update

    Hello.

    I'm doing this update:
     UPDATE (
      SELECT aux.o_customer AS a1, 
        REGEXP_REPLACE(kna.kunnr,'^0*','') AS a2
      FROM payer_catalog cli, 
        customer_master_cat kna, 
        aux_customer aux
      WHERE aux.o_customer = cli.cte_num
        AND cli.cte_num = kna.cte_num
    ) SET a1 = a2; 
    What I get is:
    ERROR at line 1:
    ORA-01779: cannot modify a column that is mapped to a table not preserved key >

    I have read on the key preserved table, but I'm going through a difficult time. Given that I did not understand the concept. Your help is greatly appreciated, so I can understand the question.

    It's the table create:
    CREATE TABLE AUX_CUSTOMER
       (     KEY_GUIDE VARCHAR2(30 CHAR), 
         O_CUSTOMER VARCHAR2(10 CHAR), 
         O_NAME VARCHAR2(80 CHAR)
       );
    
    CREATE TABLE CUSTOMER_MASTER_CAT
       (     KUNNR VARCHAR2(10 BYTE), 
         NAME1 VARCHAR2(100 BYTE), 
         NAME2 VARCHAR2(100 BYTE), 
         CTE_NUM VARCHAR2(10 BYTE)
       ) ;
    
    CREATE TABLE PAYER_CATALOG
       (     CTE_NUM VARCHAR2(10 BYTE), 
         PAYER VARCHAR2(100 BYTE)
       );
    And some inserts:
    Insert into AUX_CUSTOMER (KEY_GUIDE,O_CUSTOMER,O_NAME) values ('171109366944  23/01/12','N001210514',null);
    Insert into AUX_CUSTOMER (KEY_GUIDE,O_CUSTOMER,O_NAME) values ('005107145536  23/01/12','N001210600',null);
    Insert into AUX_CUSTOMER (KEY_GUIDE,O_CUSTOMER,O_NAME) values ('666318008569  23/01/12','0000104574',null);
    Insert into AUX_CUSTOMER (KEY_GUIDE,O_CUSTOMER,O_NAME) values ('043188136629  23/01/12','N001210514',null);
    
    INSERT INTO CUSTOMER_MASTER_CAT (KUNNR,NAME1,NAME2,CTE_NUM) VALUES ('0000008147','HONDA MOTOR','COMPANY LTD','N001210514');
    Insert into CUSTOMER_MASTER_CAT (KUNNR,NAME1,NAME2,CTE_NUM) values ('0000009559','APPLE','INC','N001210515');
    Insert into CUSTOMER_MASTER_CAT (KUNNR,NAME1,NAME2,CTE_NUM) values ('0000104574','SAMSUNG ELECTRONICS ','INC',null);
    
    Insert into PAYER_CATALOG (CTE_NUM,PAYER) values ('N001210514','HONDA');
    Insert into PAYER_CATALOG (CTE_NUM,PAYER) values ('N001210515','EXTERNAL CUSTOMER');
    Insert into PAYER_CATALOG (CTE_NUM,PAYER) values ('N001210516','CELLULAR COMPANY');
    This are not the tables I have created, I just checked the information.
    Kind regards.

    Hello

    If it is not clear how to do an UPDATE, there is a good chance that the UPDATE is not the right tool for the job.
    Try instead MERGER.

    MERGE INTO     aux_customer     dst
    USING (
         SELECT    aux.key_guide
         ,       MIN ( REGEXP_REPLACE ( kna.kunnr
                                            , '^0*'
                                      )
                       )                     AS a2
         FROM      payer_catalog             cli
         ,       customer_master_cat       kna
         ,           aux_customer                  aux
         WHERE        aux.o_customer            = cli.cte_num
         AND       cli.cte_num                 = kna.cte_num
         GROUP BY  aux.key_guide
          )                    src
    ON    (dst.key_guide     = src.key_guide)
    WHEN MATCHED THEN UPDATE
    SET   dst.o_customer     = src.a2
    ;
    

    What are the results you want from the given sample data?
    The MERGE statement above let aux_customer that looks like this:

    KEY_GUIDE                      O_CUSTOMER O_NAME
    ------------------------------ ---------- ----------
    005107145536  23/01/12         N001210600
    043188136629  23/01/12         8147
    171109366944  23/01/12         8147
    666318008569  23/01/12         0000104574
    

    Whether you use the FUSION or the UPDATE, if you update the actual table or view online, please make sure that the query that produces the new product (at most) one value of 1 line for each line in the table updated.

  • ORA-01779: cannot modify a column that is mapped to a table not preserved key

    Hello
    I'm doing update join with the type of activity of lag on my 10.2.0.3
    Here's a simple test case:
    create table test1 (id1 number, id2 number, before varchar2(10), after varchar2(10));
    
    alter table test1 add constraint pk1 primary key (id1, id2);
    
    SQL> insert into test1 values(1,1 , 'a','b');
    
    1 row created.
    
    SQL> insert into test1 values(1,2 , 'b','c');
    
    1 row created.
    
    SQL> commit;
    
    
    
    
    select * from test1;
    
      ID1        ID2 BEFORE     AFTER
    ----- ---------- ---------- ----------
        1          1 a          b
        1          2 b          c
    
    
    
    update
     (select src.before src_before, tgt.before tgt_before from test1 src , test1 tgt 
        where 
        src.id1 = tgt.id1 
    and src.id2 = tgt.id2 + 1 )
    set tgt_before  = src_before
    /
    
    set tgt_before  = src_before
        *
    ERROR at line 2:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    Problem with tgt.id2 + 1, but I need that in my logic, so how do I get around this?
    Concerning
    GregG

    Published by: 3 Sep 2012 GregG 13:23
    removed and src.id2 = 1

    Published by: 3 Sep 2012 GregG 13:31
    Corrected as pointed by Dom

    Have you tried something like this:

    UPDATE test1 a
    SET    a.before = (SELECT b.before
                       FROM   test1 b
                       WHERE  b.id1 = a.id1
                       AND    b.id2 = a.id2 - 1)
    WHERE EXISTS (SELECT 1
                  FROM   test1 c
                  WHERE  c.id1 = a.id1
                  AND    c.id2 = a.id2 - 1)
    
  • SQL error: ORA-01779: cannot modify a column that matches a key examine

    Hi all

    The requirement is that I have two tables s_party_d and S_CONTACT_d. the need to update the column name with FST_NAME | ',' | Last_name when column rowid in both tables are equal. I used the query previously below: -.

    Update
    (select
    E1. Name,
    e.FST_NAME,
    Select
    Of
    s_party_d e1,
    E S_CONTACT_d
    where
    E1. Game of ROW_ID = e.ROW_ID)
    name = FST_NAME | ',' | LAST_NAME;

    But I get the error message when executing the query

    Error in the command line: 31 column: 3
    Error report:
    SQL error: ORA-01779: cannot modify a column that is mapped to a table not preserved key
    01779 00000 - 'impossible to change a column that is mapped to a non-preserved table at key'
    * Cause: An attempt was made to insert or update columns in a join finds out who
    map to a table not kept the key.
    * Action: Change the directly underlying base tables.

    Can U please tell me why this error and how to solve?

    Thank you
    Mathon

    Mathon wrote:

    So, I have to look into some other method... I can't achieve this using a single update statement...

    Well, no matter what you do you need to decide what FST_NAME | ',' | Name to use. As I already pointed out for each line of the line of the s_party_d table there are several rows in table S_CONTACT_d. Again, you must yo decide what S_CONTACT_d table row you want to use. For example:

    update s_party_d e1
       set e1.name = (
                      select  max(e.FST_NAME) ||', '|| max(e.LAST_NAME)
                        from  S_CONTACT_d e
                        where e1.ROW_ID=e.ROW_ID
                     )
     where e1.ROW_ID in (
                         select  e.ROW_ID
                           from  S_CONTACT_d e
                        )
    /
    

    SY.

  • Function table in pipeline and the key-preservation - (ORA-01779)

    Hey oraclers,

    If I had to use a function table in the pipeline to cover complex application logic, I rarely update a subset of...

    (simplified example)
    create type derived_t as object ( key integer, value varchar2(100) );
    create type derived_tc as table of result_t;
    
    create or replace function new_derivations( p_param varchar2 ) return derived_tc pipelined
    is
      l_derived derived_t;
    begin
     
      loop
        /* do stuff here */
        .....
        pipe row( l_derived );
      end loop;
    return;
    end;
    /
    
    create table derivations
    as 
    ( 
      key integer primary key,
      value varchar2(100)
    );
    
    
    insert into derivations select t.* from table( cast( new_derivations( 'test' ) as derived_tc ) ) t;
    But when I try...
    update ( 
       select d.rowid,
                d.key,
                d.value,
                t.value new_value
       from   derivations d,
                table( cast( new_derivations( 'test' ) as derived_tc ) ) t
       where d.key = t.key 
       and     d.key between :low_key and :high_key
    )
      set value = new_value;
    I get ORA-01779: cannot modify a column that is mapped to a table not preserved key...

    OK... so reading around us need to be able to tell Oracle that each row in the result set view is preserved key - the 'key' of derivations from the table column and the column "key" to the result of the function in the pipeline are unique (and compatible).

    Is it possible to hint Oracle (11.2.0.2.0 on Windows) to achieve this?

    Thanks muchly,.

    Lachlan Pitts

    You can rewrite this kind of update in a MERGE statement statement, which I think does not suffer the problem you are experiencing:

    merge into derivations d
    using (select t.key, t.value new_value from table( cast( new_derivations( 'test' ) as derived_tc ) ) t) s
    on (d.key = s.key and d.key between :low_key and :high_key)
    when matched then update set d.value = t.new_value
    

    (Not checked for syntax errors)

    You can also watch this:
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:760068400346785797

    Published by: Toon Koppelaars February 8, 2011 05:40

  • Autconfig error: ORA-01400: cannot insert NULL into ('APPLSYS". "" "" FND_NODES '. "" NODE_NAME')

    Nice day

    I'm under EBS 11.5.10 with DB 10.2.0.4. I applied patch 7429271 following the steps described in the Doc id 233044.1.

    After restarting the application, I had one "node id does not exist for the current application" when forms started.

    After serving nodes (exec fnd_conc_clone.setup_clean) DNF, I ran successfully on the dbtier autoconfig but got the error below in the layer of apps.

    I also noticed that the content of my BCD file has been deleted and replaced by the model data (all values are by default). I tried to restore but it just had class written once again with default data.

    Hope my explanation was clear enough.

    Any suggestions?

    -adconfig.log error-

    Unique constraint error (00001) is OK if the key already exists

    java.sql.SQLException: ORA-01400: cannot insert NULL into ('APPLSYS". "" "" FND_NODES '. "" NODE_NAME')

    ORA-06512: at the 'APPS '. FND_CONCURRENT', line 1504

    ORA-06512: at the 'APPS '. FND_APP_SERVER_PKG', line 163

    ORA-06512: at line 1

    -Database error change the server

    You have the latest applied AutoConfig patch (Patch 9535311 - T2K AUTOCONFIG AND TEMPLATES CUMULATIVE HOTFIX U)? If this isn't the case, please apply the patch and then try.

    Additionally, make sure that you have entered in the file/etc/hosts.

    Thank you

    Hussein

  • ORA-01400 ccannot insert NULL into ("SYS". «SUMINLINE$ '.» ("' TEXT ')

    Hello

    First I'll apologize I can't give too much information as my client is offline and remotely. The SQL I will discuss work on his test and my solution Oracle XE. But on live, we get the error shows:

    ORA-00604: an error has occurred at the SQL level 1 recursive
    ORA-01400: cannot insert NULL into ("SYS". «SUMINLINE$ '.» ("' TEXT ').

    I have never posted on this forum but I do not understand what makes the table SUMINLINE$ and it has relevance. Please also excuse if there is a better way to write the SQL code), in any case any guideance would be useful.

    I thought it may be down to how I use rownum (he is a complete proposal) but he materializes in the previous view, I don't see how it could be)

    In any case if someone is good enough to spend a little time there, watching the SQL below I would be eternally grateful.

    -----------------------------------------------------
    STEP 1: I have a materialized view of base:
    (he uses the 'rownum' as primary key as a primary key is needed more late and from this point of view does not
    a primary key, as it is a view complex)
    -------------------------------------------------------

    Bo_socrates.baseCSIIdentPerPerson CREATE MATERIALIZED VIEW
    TABLESPACE bo_socrates
    PCTUSED 0
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE)
    1040K INITIALS
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    DEFAULT USER_TABLES
    )
    NOCACHE
    NOLOGGING
    NOPARALLEL
    IMMEDIATE CONSTRUCTION
    COMPLETE REFRESH
    WITH THE PRIMARY KEY
    AS
    SELECT rownum iid,
    csi.attendId,
    csi.sceneId,
    csi.caseId,
    csi.identDate,
    csi.identType,
    csi.subIdenttype,
    csi.suspectId,
    CSI. Surname,
    CSI. Data,
    CSI. CRO,
    CSI. ConfirmedIdent
    OF bus_objects.v_factCSIIdentPerPerson csi
    ;

    CREATE INDEX bo_socrates.ind_baseCSIIdentPerson_Id on bo_socrates.baseCSIIdentPerPerson (id)
    TABLESPACE bo_socrates
    STORAGE (INITIAL 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED) NOLOGGING;


    -----------------------------------------------------
    STEP 2: This materialized view (my fact table) uses the previous view of the materilalized
    as a point to calculate the date of fact. It is for example the background 'unit' people
    but I also need to know what people came first, that people came first with blue hats, etc..
    So I use one with instructions to discover these facts.
    * PLEASE NOTE THAT IT IS THIS VIEW WHICH TRIGGERS THE ERROR WHEN THE SCRIPT IS RUN *.
    If there is a simpler way to write so please let me know
    This point of view basically uses the primary key (id) generated in the above view by using rownum
    -------------------------------------------------------
    Bo_socrates.factCSIIdent CREATE MATERIALIZED VIEW
    TABLESPACE bo_socrates
    PCTUSED 0
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE)
    1040K INITIALS
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    DEFAULT USER_TABLES
    )
    NOCACHE
    NOLOGGING
    NOPARALLEL
    IMMEDIATE CONSTRUCTION
    COMPLETE REFRESH
    WITH THE PRIMARY KEY
    AS
    With
    firstAttend like)
    Select Attendid, Min (IdentDate) Identdate,
    Min (ID) Id,
    Min (case when identtype = 0 Then ID else null end) IPF,
    Dnaid, min (case when identtype = 1 Then ID else null end),
    Fwid, min (case when identtype = 2 Then ID else null end),
    Min (Case When Confirmedident = 1 then end Id or Null) Idconfirm,
    Fpidconfirm, min (case when identtype = 0 and Confirmedident = 1 Then ID else null end),
    Dnaidconfirm, min (case when identtype = 1 and Confirmedident = 1 Then ID else null end),
    Min (case when identtype = 2 and confirmedident = 1 Then ID else null end) FwidConfirm
    Of Bo_Socrates.Basecsiidentperperson
    Attendid GROUP),
    firstInd AS)
    Select Attendid, SuspectId, Identdate, Min (Id) Id, Min (IdentDate),
    Min (case when identtype = 0 Then ID else null end) IPF,
    Dnaid, min (case when identtype = 1 Then ID else null end),
    Fwid min (case when identtype = 2 Then ID else null end)
    Of bo_socrates. BaseCSIIdentPerPerson
    Attendid group, Suspectid)
    Select csi.id,
    csi.attendId,
    csi.sceneId,
    csi.caseId,
    csi.identDate,
    CSI.identtype,
    csi.subIdenttype,
    csi.suspectId,
    CSI. Surname,
    CSI. Data,
    CSI. CRO,
    Csi.Confirmedident,
    Case when Ind.Id is Null then 0 otherwise 1 end Firstindident.
    Case when Ind.Fpid is Null then 0 otherwise 1 end Firstindidentfp.
    Case when Ind.DNAid is Null then 0 otherwise 1 end FirstindidentDNA.
    Case when Ind.FWid is Null then 0 otherwise 1 end FirstIndIdentFW.
    Case when Att.Id is Null then 0 otherwise 1 end Firstattident.
    Case when Attfp.Fpid is Null then 0 otherwise 1 end Firstattidentfp.
    Case when AttDNA.DNAid is Null then 0 otherwise 1 end FirstattidentDNA.
    Case when Attfw.Fwid is Null then 0 otherwise 1 end Firstattidentfw.
    Case when Att.IdConfirm is Null then 0 otherwise 1 end FirstattidentConfirm.
    Case when Attfpc.Fpidconfirm is Null then 0 otherwise 1 end Firstattidentfpconfirm.
    Case when AttDNAc.DNAidconfirm is Null then 0 otherwise 1 end FirstattidentDNAconfirm.
    Cases where AttFWc.FWidconfirm is Null then 0 otherwise 1 end FirstattidentFWconfirm
    Of Bo_Socrates.Basecsiidentperperson Csi
    Left outer join Firstind Ind Csi.Id = Ind.Id
    Left outer join Firstind Indfp Csi.Id = Indfp.Fpid
    Left outer join Firstind Inddna Csi.Id = Inddna.Dnaid
    Left outer join Firstind IndFW Csi.Id = IndFW.FWid
    Left outer join Firstattend Att Csi.Id = Att.Id
    Left outer join Firstattend Attfp Csi.Id = Attfp.Fpid
    Left outer join Firstattend Attdna Csi.Id = Attdna.Dnaid
    Left outer join Firstattend Attfw Csi.Id = Attfw.Fwid
    Left outer join Firstattend Attfpc Csi.Id = AttFPc.Fpidconfirm
    Left outer join Firstattend Attdnac Csi.Id = AttDNAc.DNAidconfirm
    Left outer join Firstattend Attfwc Csi.Id = AttFWc.Fwidconfirm
    ;


    CREATE INDEX bo_socrates.ind_factCSIIdent_Id on bo_socrates.factCSIIdent (attendId)
    TABLESPACE bo_socrates
    STORAGE (INITIAL 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED) NOLOGGING;

    CREATE INDEX bo_socrates.ind_factCSIIdent_date on bo_socrates.factCSIIdent (identDate)
    TABLESPACE bo_socrates
    STORAGE (INITIAL 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED) NOLOGGING;

    CREATE INDEX bo_socrates.ind_factCSISubIdent_type on bo_socrates.factCSIIdent (subidentType)
    TABLESPACE bo_socrates
    STORAGE (INITIAL 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED) NOLOGGING;


    COMMIT;

    Details of the message of pl of the OS and database versions. It is probably a bug - pl see these Docs MOS

    Error ORA-01400 creating MView ANSI join [ID 1495499.1]
    While Alter Materialized View compilation then error ORA-01400 product [1377447.1 ID]

    As the State of docs, a fix is available in the next version of Oracle (12g) - I'd say you open an SR with Support

    HTH
    Srini

  • ORA-01400: cannot insert NULL into () in the procedure OE_Header_Util package

    Hi Hsawwan,

    When you try to save the header in the order form, you will see the following message in R12.

    Note
    --------------------------------------------------------------------------------
    ORA-01400: cannot insert NULL in
    ("TO HAVE". "" "" OE_ORDER_HEADERS_ALL '. "" ORDER_NUMBER") in the package OE_Header_Util procedure Insert_Row


    I followed the Doc-ID 1208783.1 and change the value of the profile Option, OM: Default sale Transaction Phase, NULL or "Fulfillment". and I srt a configuration document for sales orders sequence.


    Please help me how to solve the problem.

    Thank you
    Concerning
    GSM

    Are you connected to the correct responsibility?

    Have you checked if this simultaneous program is added to the application group that is the responsibility?

    Thank you
    Hussein

  • Import error: ORA-01400: cannot insert NULL in

    I'm performing a level schema import and I get this error. Half an hour, this error comes without any stop. could you please tell me how to ignore this error when executing import?

    IMP-00019: rejected due to the ORACLE 1400 error line
    IMP-00003: ORACLE error 1400
    ORA-01400: cannot insert NULL into ("LWARE_ADMIN". "" "" SAMPLE_AUDIT_LOG '. "" COUNTER")

    Db version is 10.2.0.4 and platform HP - UX B.11.31 U ia64

    Thank you!

    Hello

    Please read this article

    ORA-1400 when you import the Export Dump written in Mode Direct Path [ID 826746.1]

    Kind regards
    Rakesh jayappa

  • ORA-01400: cannot insert NULL in

    Hi all
    I got the following error when inserting values in the database can someone guide me please?
    ORA-01400: cannot insert NULL in

    create table sara1
    (ID number primary key (10),)
    Add varchar2 (10) not null,
    Add2 varchar2 (10) not null;

    Insert into sara1
    (add, add2)
    values ('USA', 'Angel');

    ERROR on line 1:
    ORA-01400: cannot insert NULL in


    Sarah

    Published by: SarahSarahSarah on August 27, 2009 13:56

    Is missing a value for the column ID of the insert statement. And a primary key cannot contain NULL values.

    -Andy

    Published by: a Tael on August 27, 2009 16:03

  • Gets the error ORA-01779 after I added the column

    Hi, I'm a total newbie in APEX but collaborated with ordinary development Oracle (tables, views, packages, triggers, etc) for a number of years.

    I ve been assigned in order to respect an existing application to APEX. One task is to add a column to a single character named 'ACTIVE' to a database table and also present on a current project list page. The value can be 'Y' or 'n'. In the view which is the source of data for the project page ad 'Y' turned into 'Yes' and 'n' turned into 'no '. So far so good, everything works well.

    There is another page on which it is possible to create new or modify existing projects. This page uses a view as a source of data. On this page, I added a group of radiobutton that contains two options: 'Yes' and 'no '. When I select to edit a project in the project list page the second page is loaded and the correct option, 'yes' or 'No', is marked on the page. This group of radiobutton works exactly like a couple of other groups of radiobutton also represented with a single character column in the database. So far so good!

    However, when I try to save the project file by clicking on "Apply Changes" I get this error:

    ORA-20001: DML error: p_rowid = 50, ID = p_alt_rowid, p_rowid2 =, p_alt_rowid2 is. ORA-01779: cannot modify a column that is mapped to a table not preserved key

    What is the problem here? The new 'ACTIVE' column is added to the view, when I run the view I Don t get all records in duplicate, the underlying table has a column id as the primary key.

    Since I Don t know that APEX is under the hood it s hard tp what's wrong. Anyone knows the solution to this problem?

    / Magnus

    Hello Magnus,

    Is there an INSTEAD OF trigger defined on the view? Have you added the new column ACTIVE there too?

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • ORA-01427 during the attempt to INSERT SQL job

    Hello

    I have non-logiques problem.

    I use Oracle 10 g.
    I have a query that contains some subqueries, this is pretty normal query as similar milion:

    SELECT a.field1,
    (SELECT b.field2 FROM tab2 b WHERE b.key = a.key) Field2
    OF tab1 a

    Query works fine, amount of the returns expected Recordset, but while I'm saving it somehow it returns me an error:
    ORA - 01427:single - line subquery returns multiple rows

    It would be normal that I have by running a SELECT statement. But SOME major work - error occurs when I try to save the results somehow - INSERT, CREATE TABLE AS or save it to file.

    Help, please.
    Thank you.

    nodeX wrote:

    Query works fine, amount of the returns expected Recordset, but while I'm saving it somehow it returns me an error:
    ORA - 01427:single - line subquery returns multiple rows

    No it's not. Most likely you use SQL * Developer, Toad, SQL * Navigator or another GUI tool that retrieves the screen by screen lines. So when you run this select your tool retrieves and displays just the first screen and it happens so that for the first lines of the scalar subquery in your select screen returns just one line. However, when you issue INSERT SELECT all lines are read, and at least one of them, results in a scalar subquery returns more than one line. Do a complete test of your question, SELECT, SELECT your tool try and extract all lines (in most of the tools it's > button) or post your query in SQL * more. In all cases:

    SELECT a.field1,
    (SELECT b.field2 FROM tab2 b WHERE b.key = a.key) field2
    FROM tab1 a
    

    means the key of the column in the table tab2 is logically unique for any value of tab1.key.

    SY.

  • ORA-44003: invalid SQL name during INSERTION

    I have a form that contains 4 areas (1 hidden field - iD which is the primary key, the selection list - Department, a text field - reports on the year and a field of the shuttle -. employees The user selects the Department, changing the date, and then selects the employees of the Department. When you press the button submit, a line must be inserted if ID is null. I get an ORA-44003: SQL invalid name as he tries to insert a row. Can someone please?

    It is on the APEX. ORACLE.COM:
    Workspace: RGWORK
    Application: Disclosure of financial information (30986)
    Page: 15
    User: TESTER
    Password: test123

    Make sure that you choose the TECHNOLOGY SERVICES DESIRE for the Department.

    Robert
    http://apexjscss.blogspot.com

    Hi Robert,.

    There were a few issues in there:

    P15_ID has been specified as a column of data, but without a source (I put in the ID)
    P15_DEPT - same question (I put in the DEPT)
    P15_EMPLOYEES - has been specified as a column of data with an EMPLOYEES_SELECTED source (I've corrected to EMPLOYEE_NUMBERS)

    Looks like it's working now.

    Hope this helps,
    John

    If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

Maybe you are looking for