Unable to Insert record In forms: error -ORA-01779 :cannot modify a column

Hi,
I have created one form with two block.
Block-1 : Based on View
Block-2 : Based on table
There is is relationship between Block-1 and Block-2.
Block-1 is populating from LOV.
I just need to insert /update record Block-2 based on data from Block-1
So Block-1 I have made read only at runtime (Inser/update all properties are false).
Now when I insert record in Block-2 based on record from block-1, and getting below error.
"ORA-01779: cannot modify a column which maps to a non key-preserved table"
It is not allowing to insert record.
Please help me.
Subir

The error states that there is some operation on a view, not an a table.
Now when I insert record in Block-2 based on record from block-1What does that mean? How do you insert records in block 2?
When exactly occurs the error?

Similar Messages

  • Problem in updating fa_additions SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table

    Hi,
    After using sql loader to import informations in the table fa_mass_additions and after the functionnal uses a treatment to imputate this assets, it asks me to do an update on the table fa_additions to change the value of attribute1 but i get an error
    Error report:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    ORA-06512: at line 11
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which
               map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    please how can i do this update?

    Hi,
    The "fa_additions" is a view, not a table.
    You should update the base table "fa_additions_b".
    Regards,
    Bashar

  • ORA-01779: cannot modify a column which maps to a non key-preserved table

    define cusname='GEORGE';
    INSERT INTO (select s.prd_id, s.cus_id, s.qty_sold, s.price from sales s, customers c where s.cus_id=c.cus_id)
    VALUES (102,(select cus_id from customers where upper(c_name) like '%GEORGE%'),14,(select price from product where prd_id = 102)*14)
    I am getting the following error when I am trying to run the above query.
    SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    CUSTOMERS TABLE
    Name   
    Null   
    Type        
    CUS_ID 
    NOT NULL
    NUMBER      
    C_NAME         
    VARCHAR2(50)
    C_LIMIT         
    NUMBER      
    CITY           
    VARCHAR2(20)
    PRODUCT TABLE
    Name 
    Null   
    Type        
    PRD_ID
    NOT NULL
    NUMBER      
    PRICE         
    NUMBER      
    COST           
    NUMBER      
    SALES TABLE
    Name   
    Null   
    Type  
    PRD_ID 
    NOT NULL
    NUMBER
    CUS_ID 
    NOT NULL
    NUMBER
    QTY_SOLD         
    NUMBER
    PRICE             
    NUMBER

    Hi,
    As the error message sugggested, INSERT directly into the sales table.  You can get the values from a sub-query that joins whatever tables are needed, including sales itself.  MERGE might be simpler and more efficient than INSERT.
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    If you're asking about a DML statement, such as INSERT, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • UPDATE with inline view - ORA-01779:cannot modify a column which maps to a

    Hello....
    With the following SQL, I get the ORA-01779 mentioned in the Subject Line:
    update
    (select a.old_c1
    ,a.old_c2
    ,a.old_c3
    ,b.old_c1
    ,b.old_c2
    ,b.old_c3
    from table1 a, table2 b
    where a.id = b.id)
    set a.old_c1 = b.old_c1
    ,a.old_c2 = b.old_c2
    ,a.old_c3 = b.old_c3;
    Any help or explanation would be helpful. Thank you.

    This does not work either.Works for me:
    SQL> select * from table1;
                      ID O O O
                     101 a b c
                     102 d e f
    SQL> select * from table2;
                      ID O O O
                     101 x y z
                     103 g h i
    SQL> update table1 a
      2  set   (a.old_c1
      3        ,a.old_c2
      4        ,a.old_c3
      5        ) = (select b.old_c1
      6                   ,b.old_c2
      7                   ,b.old_c3
      8             from   table2 b
      9             where  b.id = a.id
    10            )
    11  where exists
    12            (select 1
    13             from   table2 b
    14             where  b.id = a.id
    15            );
    1 row updated.
    SQL> select * from table1;
                      ID O O O
                     101 x y z
                     102 d e fNeed a little more to go on than "doesn't work".
    Are you still getting duplicates in the subquery?

  • Error ORA-01779 while updating view

    I am using oracle 9i version is 9.2.0.1.0, While updating i am getting error,which i mention below.
    ORA-01779:cannot modify a column which maps to a non key-preserved table
    In this view there is no any group function.
    Help me please.

    ORA-01779:
         cannot modify a column which maps to a non key-preserved table
    Cause:      An attempt was made to insert or update columns of a join view which map to a non-key-preserved table.
    Action:      Modify the underlying base tables directly.

  • SQL Error: ORA-04092: cannot COMMIT in a trigger

    Trying to drop the table inside the trigger but i'm unable to do it.
    SQL Error: ORA-04092: cannot COMMIT in a trigger
    I need to drop the table based on the some condition say condition is the archive table with more than millions of records which is of no use so i plan to drop the table.
    I will be inserting the the unwanted table to mytable ,mytable which is having the trigger will fire to drop the table.
    I need this to be done on automatic basis so i have chosen trigger.
    is there anyway of automatic other than trigger in this case.

    933663 wrote:
    Trying to drop the table inside the trigger but i'm unable to do it.
    SQL Error: ORA-04092: cannot COMMIT in a trigger
    I need to drop the table based on the some condition say condition is the archive table with more than millions of records which is of no use so i plan to drop the table.
    I will be inserting the the unwanted table to mytable ,mytable which is having the trigger will fire to drop the table.
    I need this to be done on automatic basis so i have chosen trigger.
    is there anyway of automatic other than trigger in this case.You can't COMMIT inside a trigger. Oracle issue an auto COMMIT before and after the execution of DDL. So you can't use DDL in trigger. You may get suggestion to use AUTONOMOUS_TRANSACTION to perform COMMIT within tirgger. But dont do that. Its wrong idea.
    I will suggest you look back into your requirement and see what exactly you want. You could schedule a job that runs on a daily basis that will pick up the object details from your table and drop them accordingly.

  • ORA-12032: cannot use rowid column

    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.
    PS :
    my script is :
    START WITH TO_DATE('06-jul-2010 17:57:48','dd-mon-yyyy hh24:mi:ss')
    NEXT SYSDATE+1/24

    user522961 wrote:
    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.run above
    EXECUTE DBMS_MVIEW.REFRESH('MV_NAME','C');

  • ORA-02348: cannot create VARRAY column with embedded LOB

    Hi
    This error message I get when I try to create a table from my schema file which has a (sub-) element of type CLOB.
    In my XML document I have an element which needs to become declared a CLOB (because it's > 4000 bytes), in my Schema I define it's element node like:
    <xs:element name="MocovuState" xdb:SQLType="CLOB">
    I can register this Schema file but when I create the table, I get the error:
    ORA-02348: cannot create VARRAY column with embedded LOB
    Does anybody know how to handle this ?
    Marcel

    You need to use the xdb:storeVarrayAsTable="true" schema annotation so that unbounded elements are created at schema registration time as nested tables. Varrays can not contain CLOBs/BLOBS. Use the schema annotation xdb:SQLType="CLOB" to tell Oracle XMLDB to use CLOB storage for the element. See your schema below:
    P.S. XMLSPY is invaluable as it supports Oracle XML Schema annotations.
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="http://www.yourregisteredschemanamespace.com" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="nRootNode">
              <xs:complexType>
                   <xs:all>
                        <xs:element name="nID" type="xs:long"/>
                        <xs:element name="nStringGroup" type="nStringGroup" minOccurs="0"/>
                   </xs:all>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="nStringGroup">
              <xs:sequence>
                   <xs:element name="nString" type="nString" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="nString" xdb:SQLType="CLOB">
              <xs:sequence>
                   <xs:element name="nValue" type="nValue" minOccurs="0" xdb:SQLType="CLOB"/>
              </xs:sequence>
              <xs:attribute name="id" type="xs:long" use="required"/>
         </xs:complexType>
         <xs:simpleType name="nValue">
              <xs:restriction base="xs:string">
                   <xs:minLength value="1"/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

  • ORA-12983: cannot drop all columns in a table

    Hi,
    I am creating a table with two columns.
    I have modified a column as unused using ALTER statement.
    After that i have tried to drop the another column by using ALTER statement.
    But it throws an error ORA-12983: cannot drop all columns in a table.
    is it not possible to achieve this via ALTER statement?
    thanks

    is there any other way to find the name of the columns which have been marked as unused?Don't think so, and you would not be able to do much about. You won't be able to reference it, you won't be able to un-unuse it, and you would even be able to add a new column having same name.
    Why are you using SET UNUSED in the first place?
    Regards
    Peter
    Quoting myself:
    You won't be able to reference itMaybe not good enough:
    SQL> select column_name, data_type, segment_column_id
      from user_tab_cols
    where table_name = 'T';
    COLUMN_NAME                    DATA_TYPE   SEGMENT_COLUMN_ID
    SYS_C00001_11051618:28:14$     NUMBER                      1
    B                              NUMBER                      2
    SYS_C00003_11051618:28:14$     NUMBER                      3
    3 rows selected.
    select "SYS_C00003_11051618:28:14$" from t
    Error at line 1
    ORA-00904: "SYS_C00003_11051618:28:14$": invalid identifier
    SQL> alter table t drop column "SYS_C00001_11051618:28:14$";
    Table altered.
    SQL> select column_name, data_type, segment_column_id
      from user_tab_cols
    where table_name = 'T';
    COLUMN_NAME                    DATA_TYPE   SEGMENT_COLUMN_ID
    B                              NUMBER                      
    1 row selected.
    Note: Both columns "disappeared"  Thanks MichaelS
    Edited by: Peter on May 16, 2011 9:29 AM

  • Oracle forms error frm-40508: unable to insert record

    Hi Everyone,
    I have been having this problem for 2 weeks and I realize that I spent alot of time I couldn't get to fix the problem so I need your help.
    Here is my situation. First, I installed Oracle 10g in my laptop with Oracle forms10g and Oracle forms904i. I had oracle_home folder as the top level structure then I have inside oracle folder, Oracle10g in it own folder, Oracle9i release2 in it own folder. then I created the user account "student" using the system/manager account finally I granted privilleges as follow:
    GRANT ALL PRIVILLEGES
    TO student
    WITH ADMIN OPTION;
    this was working perfecty I didn't need to grant objects privilleges such as
    GRANT INSERT, UPDATE, DELETE
    ON customers
    TO student;
    Then I created a form Application prototype and it works well I could Insert, Update and Delete but now I am creating an e-commerce application prototype I created an new account using a system/manager account as I did previously and grant all privilleges. When I try to grant object privileges the message that I receive says ORA-01919 : role 'INSERT' doesn't exist
    When I run the application I am unable to insert the record through forms I get message frm-40508 Orcle error: unable to insert record.
    I deinstall the Oracle and clean my laptop and did a clean installation using only Oracle Server10g and Oracle Developer10g I am getting the same message frm-40508.
    Can someone please help me on this. the insert command that I am running is a simple one such as
    INSERT INTO customers
    VALUES( block_name.field_name, ....);
    COMMIT;

    frm 40735:When button pressed trigger raised unhanded exceptionplease help me to solve this>
    The FRM-40735 is a generic Unhandled Exception. Please post the full error message so we can better help you.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Unable to INSERT record but inserting. Forms 4.5 error through Apps 10.7

    Hi All,
    I have written the following code on save button on form 4.5 which has been used from APPS. I created the master-detail relation also.
    It suppose to insert a row into header and then into lines.
    Its inserting the row into both the tables but getting the following error in betweeen.
    ===========
    FRM-40508: ORACLE error: unable to INSERT record.
    ORA-01400: cannot insert NULL into ("VFI"."VFI_PC_DEFINITION_LINES"."LINE_ID")
    ===========
    I am thinking problem is some where in some default triigers or on insert triggers
    but unable to trace it. CAN anybody through a light on this ?
    ================================================
    PROCEDURE VFI_INVPCS IS
    i          number;
    v_item_id     number;
    v_item_id1     number;
    v_temp      varchar2;
    v_user_id NUMBER := 1111; --fnd_global.user_id;
    Lv_ChkFlag VARCHAR2(1);
    Lv_UnChkFlag VARCHAR2(1);
    ln_header_seq NUMBER;
    ln_lines_seq NUMBER;
    BEGIN
    BEGIN
    SELECT inventory_item_id
    INTO v_item_id
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    and segment1 = :VFI_PC_DEFINITION_HEADER.parent_inventory_item_id;
    SELECT VFI_PC_DEFINITION_HEADER_SEQ.nextval
    INTO ln_header_seq
    FROM DUAL;
    SELECT VFI_PC_DEFINITION_LINES_SEQ.nextval
    INTO ln_lines_seq
    FROM DUAL;
    INSERT INTO VFI_PC_DEFINITION_HEADER( HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,START_DATE
    ,END_DATE
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE)
    VALUES ( ln_header_seq
         ,v_item_id
         ,:VFI_PC_DEFINITION_HEADER.start_Date
         ,:VFI_PC_DEFINITION_HEADER.end_date
    ,v_user_id
         ,sysdate
         ,v_user_id
         ,SYSDATE
    COMMIT; -- header
    GO_BLOCK('VFI_PC_DEFINITION_LINES');
    LOOP
    SELECT inventory_item_id
    INTO v_item_id1
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    AND segment1 = :VFI_PC_DEFINITION_LINES.child_inventory_item_id;
    First_record;
    IF :VFI_PC_DEFINITION_LINES.child_inventory_item_id is not null then
    IF :CFY_PTID_FLAG='Y' THEN
    Lv_ChkFlag:=:CFY_PTID_FLAG;
    INSERT INTO VFI_PC_DEFINITION_LINES( LINE_ID
    ,HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,CHILD_INVENTORY_ITEM_ID
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE
    ,CFY_PTID_FLAG)
    VALUES ( ln_lines_seq
    ,ln_header_seq
    ,v_item_id
    ,v_item_id1
    ,v_user_id
    ,SYSDATE
    ,v_user_id
    ,SYSDATE
    ,Lv_ChkFlag
    END IF;
    END if;
    NEXT_RECORD;
    EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';      
    END LOOP;
    message('After Insert Child');
    message('After Insert Child');
    COMMIT;
    END;
    ================================================

    not sure on the block structure of your forms.
    one would question why you seem to be doing a lot of the default insert work on the press of a button (when-button-pressed).
    also if you have a master-detail relationship in the form - why you don't let forms handle the master-detail insert.
    seems like you have database database blocks but are almost coding as if they are non-base table blocks.

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
    columns in there that the type does not match the table. (check the sizes of things too while you're at it.)

  • Unable to INSERT record : ERROR

    SR # : 3-2184192641
    RMS Version 13.1.3
    Form : dealmain.fmb
    Customer is reporting the following error
    "FRM:40508-Oracle error:Unable to INSERT record"
    On looking into detail error the following message is displayed
    "INSERT INTO deal_threshold( lower_limit,upper_limit,value,total_ind,target_level_ind,reason,deal_id,deal_detail,
    create_datetime,last_update_datetime,last_update_id) values(1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)."
    Please advice.

    Are the values for the columns being supplied from the application? If so check the formats of the columns and corresponding values of the same. If they are matching then check whether a null being inserted for a not null column..
    Of course there could be many more reasons for this error.
    Give the complete details of the columns, their properties and the values being inserted into the table.
    Regards,
    Sandy.

  • Unable to INSERT record

    Hi
    when trying to insert a record in a form builder application I getted the following
    error
    FRM-40508: ORACLE error: unable to INSERT record.
    Is the reason that I have not the authority to enter by by system account althought
    I have granted dba to scott and that successed ?
    To get a full overview of my problem please see my previous thread.
    thanks for adavance

    volberg wrote:
    in most cases you forget a required field.
    Press Shift+F1 to get the error message in detailsql statements in error
    INSERT INTO STUDENTS(STUD_ID,STUD_NAME) VALUES (:1,:2)
    error
    ORA-00001: unique constraint (ELHADI.SYS_C005462) violated
    Edited by: VANPERSIE on Aug 29, 2008 5:16 PM

  • Updating detail record and getting multiple 'UNABLE TO INSERT RECORD' msgs

    Help! We have 2 datablocks, master and detail block with relation defined. Master is defined with view based on database joins; detail is view based on table.
    When I update the record in detail block, error message 'UNABLE TO INSERT RECORD' appears four times, then I get transaction complete: 5 records applied and saved, where the one record successfully updates. Why are we getting four records with insert errors and one record update? We don't want to work directly on the table, but why can't we use the view? please help.

    The UNABLE TO INSERT record will be accompanied by more information if you press the Display Error key. Your form commit processing should stop when it gets an error like this, the fact that it doesn't implies that somewhere in your code you are not checking for FORM_SUCCESS before continuing doing something else.
    This sounds quite involved, we would need to have more information about what records are queried and what's being changed on them to cause the commit.

Maybe you are looking for

  • Undo is not working properly (grayed out)

    Undo is not working properly in Indesign CC 9.2. I am using a 17" MBP running OSX 10.9.1. Processor: 2.2 GHz Intel Core i7 Memory: 4GB 1333 MHz DDR3 I ran into this issue doing a publication layout. I was not doing anything overly complicated. Copyin

  • File sharing and music sharing in iTunes not working on local network

    Hi Folks I am now going to make a topic of my own this time. Here is how it doesn´t work: I have a MBP with Mac OS 10.5.4 connected via Airport to my local network. The switch is a zyXel 2602HW-D1A. On my network there is an iMac Flat Panel 800 mHz a

  • Write to mySQL database easily?

    Hi- I am currently a student just having some fun with the Flex beta but as a student I do not have access to powerful corporate networks or data services, etc. I have a lot of great ideas for flex applications for clubs I am in, etc. but they all re

  • Process flow of FI-TV

    Hi all, Where can i find the process flow of FI-TV module? Thanks in advance.

  • Convert dynamic form to dynamic input form

    Hi All, I am using Jdeveloper 11.1.2.4. As a part of a requirement, I have created a dynamic form built out of a read only view object. On a user event (button press), I want to convert the form into an input form to allow the user to make suitable c