Error while inserting data into a table.

Hi All,
  I created a table.While inserting data into the table i am getting an error.Its telling "Create data Processing Function Module".Can any one help me regarding this?
Thanx in advance
anirudh

Hi Anirudh,
  Seems there is already an entry in the Table with the same Primary Key.
INSERT Statement will give short dump if you try to insert data with same key.
Why dont you use MODIFY statement to achieve the same.
Reward points if this Helps.
Manish

Similar Messages

  • Error while Inserting data into flow table

    Hi All,
    I am very new to ODI, I am facing lot of problem in my 1st interface. So I have many questions here, please forgive me if it has irritated to you.
    ========================
    I am developing a simple Project to load a data from an input source file (csv) file into a staging table.
    My plan is to achieve this in 3 interfaces:
    1. Interface-1 : Load the data from an input source (csv) file into a staging table (say Stg_1)
    2. Interface-2 : Read the data from the staging table (stg_1) apply the business rules to it and copy the processed records into another staging table (say stg_2)
    3. Interface-3 : Copy the data from staging table (stg_2) into the target table (say Target) in the target database.
    Question-1 : Is this approach correct?
    ========================
    I don't have any key columns in the staging table (stg_1). When I tried to execute the Flow Control of this I got an error:
    Flow Control not possible if no Key is declared in your Target Datastore
    With one of the response (the response was - "FLOW control requires a KEY in the target table") in this Forum I have introduced a column called "Record_ID" and made it a Primary Key column into my staging table (stg_1) and my problem has been resolved.
    Question-2 : Is a Key column compulsary in the target table? I am working in BO Data Integrator, there is no such compulsion ... I am little confused.
    ========================
    Next, I have defined one Project level sequence. I have mapped the newly introduced key column Record_Id (Primary Key) with the Project level sequence. Now I am got another error of "CKM not selected".
    For this, I have inserted "Insert Check (CKM)" knowledge module in my Project. With this the above problem of "CKM not selected" has been resolved.
    Question-3 : When is this CKM knowledge module required?
    ========================
    After this, the flow/interface is failing while loading data into the intermediar ODI created flow table (I$)
    1 - Loading - SS_0 - Drop work table
    2 - Loading - SS_0 - Create work table
    3 - Loading - SS_0 - Load data
    5 - Integration - FTE Actual data to Staging table - Drop flow table
    6 - Integration - FTE Actual data to Staging table - Create flow table I$
    7 - Integration - FTE Actual data to Staging table - Delete target table
    8 - Integration - FTE Actual data to Staging table - Insert flow into I$ table
    The Error is at Step-8 above. When opened the "Execution" tab for this step I found the message - "Missing parameter Project_1.FTE_Actual_Data_seq_NEXTVAL RECORD_ID".
    Question-4 : What/why is this error? Did I made any mistake while creating a sequence?

    Everyone is new and starts somewhere. And the community is there to help you.
    1.) What is the idea of moving data from stg_1 and then to stg_2 ? Do you really need it for any other purpose other than move data from SourceFile to Target DB.
    Otherwise, its simple to move data from SourceFile -> Target Table
    2.) Does your Target table have a Key ?
    3.) CKM (Check KM) is required when you want to do constraint validation (Checking) on your data. You can define constraints (business rules) on the target table and Flow Control will check the data that is flowing from Source File to Target table using the CKM. All the records that donot satisfy the constraint will be added to E$ (Error table) and will not be added to the Target table.
    4.) Try to avoid ODI sequences. They are slow and arent scalable. Try to use Database sequence wherever possible. And use the DB sequence is target mapping as
    <%=odiRef.getObjectName( "L" , "MY_DB_Sequence_Row" , "D" )%>.nextval
    where MY_DB_Sequence_Row is the oracle sequence in the target schema.
    HTH

  • Error while inserting data into BFILE datatype

    Dear Experts,
    I am trying to insert data into resume table, but it is throwing error:
    create table resume(resume blob);
    declare
    f_lob bfile;
    b_lob blob;
    begin
    insert into resume(resume) values(empty_blob())
    return documents into b_lob;
    f_lob := bfilename( 'RESUME_SAVE', 'Pawan-resume.doc' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile
    ( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    return documents into b_lob;
    ERROR at line 8:
    ORA-06550: line 8, column 10:
    PL/SQL: ORA-00904: "DOCUMENTS": invalid identifier
    ORA-06550: line 7, column 2:
    PL/SQL: SQL Statement ignored
    Please help
    Regards
    Sunil Kumar

    Thank you very much Mihael................... It works
    But I think there is a mistake in oracle documentation, please check following link:
    http://docs.oracle.com/cd/B10501_01/appdev.920/a96591/adl14cas.htm
    Thanks & Regards
    Sunil Kumar

  • Error while loading  data into External table from the flat files

    HI ,
    We have a data load in our project which feeds the oracle external tables with the data from the Flat Files(.bcp files) in unix.
    While loading the data, we are encountering the following error.
    Error occured (Error Code : -29913 and Error Message : ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: un) while loading data into table_ext
    Please let us know what needs to be done in this case to solve this problem.
    Thanks,
    Kartheek

    Kartheek,
    I used Google (mine still works).... please check those links:
    http://oraclequirks.blogspot.com/2008/07/ora-29400-data-cartridge-error.html
    http://jonathanlewis.wordpress.com/2011/02/15/ora-29913/
    HTH,
    Thierry

  • Error While Inserting Data into table using OAF

    Hi Experts,
    I am learning OAF; i am trying into insert the data into table using OAF. I followed the below procedure.
    My table(OLF_TEST_TBL) Columns:
    EmpID (Number), Ename(VARCHAR2 100), Sal Number, and who columns.
    1. created Application Module (AM).
    package: oracle.apps.mfg.simplepg.server
    name: oaf_test_tbl_am
    2. created simple page
    name:EmployeePG
    package:oracle.apps.mfg.simplepg.webui
    3. Assigned the Application Module to Page
    4. Created Entity Object(EO)
    name:oaf_test_tbl_eo
    package:oracle.apps.mfg.simplepg.schema.server
    schema:apps
    table:OLF_TEST_TBL
    note:
    1. EMPID column is selected as primary key
    2. selected create method, remove method and validation method.
    3.checked generate default view object
    VO:
    name:olf_test_tbl_vo
    note: Entity Object was assigned to VO
    Coming To page:
    page main region:EmployeeMainRN
    1.under main region i created one more region using wizard
    selected AM and VO, region style-default single column
    2. under main region i created one more region
    region style- pagebuttonbar, ID:pagebutoonsRN
    3. under pagebuttonRN, created two submit buttons(ID:SUBMIT, ID:CANCEL).
    In AM java page:
    created a method to insert row and for commit.
    Insert Method:
    public void insertrow(){
    OAViewObject vo=(OAViewObject)getoaf_test_tbl_vo1();
    if(!vo.isPreparedForExecution()){
    vo.executeQuery();
    Row row=vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Commit Method:
    public void savaDataTooaftesttable(){
    getDBTransaction().commit();
    In EmployeeMainRN, created a controller.
    In this controller process request method, 'insertrow' method was called.
    import oracle.apps.fnd.framework.OAApplicationModule;
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("insertrow");
    To commit the transaction when SUBMIT button pressed, commit method was called in process form request method.
    import oracle.apps.fnd.framework.OAViewObject;
    public void processformRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("SUBMIT") != null)
    am.invokemethod("savaDataTooaftesttable");
    Error After clicking the submit button_
    I ran the page, page was opened successfully. Once i enter data and click submit button, it's giving the following error.
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example). If the browser's navigation buttons were not used, this error could have been caused by coding mistakes in application code. Please check Supporting the Browser Back Button developer guide - View Object Primary Key Comparison section to review the primary causes of this error and correct the coding mistakes.
    Cause:
    The view object oaf_test_tbl_am.oaf_test_tbl_vo1700_oaf_test_tbl_vo1_practice_test_prc1_oracle_apps_mfg_simplepg_server_oaf_test_tbl_am.oaf_test_tbl_vo1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    Experts, Kindly help me why i am getting this error.
    Awating your replies.
    Thanks in advance.

    If you dont want to create message. You can throw exception like below as well
              throw new OAException("Emp Id is "+empId+" and employee name is "+empName, OAException.CONFIRMATION);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error in native SQL while inserting data into CORP table

    HI all,
    I am getting an exception while inserting records using native SQL into CORP table.
    PFB the code.
    LOOP AT gi_hrp1001 INTO wa_hrp1001.
      TRY.
            EXEC SQL.
              INSERT INTO misuser.Table_4
              VALUES (wa_hrp1001-otype , wa_hrp1001-objid ).
            ENDEXEC.
          CATCH cx_sy_native_sql_error.
            MESSAGE 'Connect - Error ' TYPE 'E'.
        ENDTRY.
      ENDLOOP.
    Please help.
    Thanks & Regards
    Nitesh

    I see two issue with your Insert. 1) you need to specify the field names in the table, for example otype and objid. 2) You need to indicate in the VALUES that you're using host variables by using the prefix :.
    I think the correct syntax is:
            EXEC SQL.
              INSERT INTO misuser.Table_4
             (otype, objid)
              VALUES (:wa_hrp1001-otype, :wa_hrp1001-objid)
            ENDEXEC.
    Good luck.

  • Access issues while inserting data in a table in same schema

    Hi All.
    I have a script that at first creates and then populates a table. My script used to run fine in production environment till few hours back. But all of a sudden, it is popping up error while inserting data into the table .
    Error message - "Insufficient Previlages".
    Please suggest me what may be the reasons for this kind of error.
    Thanks in advance

    Sonika wrote:
    Hi All.
    I have a script that at first creates and then populates a table. My script used to run fine in production environment till few hours back. But all of a sudden, it is popping up error while inserting data into the table .
    Error message - "Insufficient Previlages".
    Please suggest me what may be the reasons for this kind of error.
    1) something changed
    2) you are hitting a bug

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • Inserting Data into nested table

    I am exploring the differences between OBJECT & RECORD.
    As i am still in process of learning, I found that both are structures which basically groups elements of different datatypes or columns of different datatypes, one is used in SQL and other is used in PL/SQL, please correct me if I am wrong in my understanding.
    Below i am trying to insert data into an table of type object but i am unsuccessful can you please help.
    CREATE OR REPLACE type sam as OBJECT
    v1 NUMBER,
    v2 VARCHAR2(20 CHAR)
    ---Nested Table---
    create or replace type t_sam as table of sam;
    --Inserting data----
    insert into table(t_sam) values(sam(10,'Dsouza'));
    Error Message:
    Error starting at line 22 in command:
    insert into table(t_sam) values(sam(10,'Dsouza'))
    Error at Command Line:22 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 -  "invalid table name"
    *Cause:   
    *Action:

    Ariean wrote:
    So only purpose of equivalent SQL types concept of nested tables is to use them as one of the data types while defining an actual table?
    Sort of - you can definitely use them for more than just "defining an actual table". (I'm fairly certain you could pass a nested table into a procedure, for example - try it, though - I'm not 100% sure on that - it just "makes sense". If you can define a type, you can use it, pass it around, whatever.).
    Ariean wrote:
    And that nested table could be a record in SQL or an Object in PLSQL or just simple datatype(number,varchar etc)?
    Nested tables are just like any other custom data type. You can create a nested table of other data types. You can create a custom data type of nested tables.
    It could get stupidly .. er, stupid O_0
    CREATE TYPE o_myobj1 AS object ( id1   number, cdate1  date );
    CREATE TYPE t_mytype1 AS table of o_myobj1;
    CREATE TYPE o_myobj2 AS object ( id2   number,  dumb  t_mytype1 );
    CREATE TYPE t_dumber AS table of o_myobj2;
    O_0
    Ok, my brain's starting to hurt - I hope you get the idea
    Ariean wrote:
    Secondly is my understanding correct about OBJECT & RECORD?
    I can't think of any benefit of describing it another way.

  • ORA-1013 when trying to insert data into the table

    Hi,
    While inserting record into a table, we are getting the following error:
    ORA-1013
    01013, 00000, "user requested cancel of current operation"
    I could not find any information in alert log also.
    We have a bitmap index on this table. However, we never got this error till now.
    Also i found that the tablespace who stores data has lot of space and tablespace which consists of the indexes is close to 90% full today ( i dont know what was the space available yesterday when there was error).
    I know that information i provided might be very less, but i gave as much information as i can provide.
    Can you please help me in trouble shooting this problem.
    Thank you
    Giridhar

    Sorry. i forgot to give version information
    Oracle version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    OS: SunOS 5.10
    we got it only once yesterday. only for one table. not for any other tables.
    Thanks aalap for your quick response.
    Giridhar

  • Insert data into fact table from source database tables

    here i try to insert data into fact table from source database tables here is the query 
    ALTER procedure [dbo].[facttable]
    as
    insert into [pp dw].dbo.Dimfact(Prod_ID,Production_ID,Material_ID,Equip_ID,WC_ID,Recipe_ID,Quantity,costprice)
    select Products.[Product ID],[Production ID],Materials.[Material ID],[Equipment ID],[Work Centre ID],[Recipy ID],Quantity,[cost price]
    from
    [PRODUCTION PLANNING 2].dbo.[Products],
    [PRODUCTION PLANNING 2].dbo.[Production Detail],
    [PRODUCTION PLANNING 2].dbo.[Material category],
    [PRODUCTION PLANNING 2].dbo.[Materials],
    [PRODUCTION PLANNING 2].dbo.[Equipment],
    [PRODUCTION PLANNING 2].dbo.[Working Centre] ,
    [PRODUCTION PLANNING 2].dbo.[Recipies]
    where
    Products.[Product ID] in (13, 14, 15, 16, 17) and
    [Production Detail].[Production ID] in (1, 2, 3) and
    [Materials].[Material ID] in (1, 2, 3, 4, 5) and
    [Equipment].[Equipment ID] in (1, 2, 3, 4) and
    [Working Centre].[Work Centre ID] in (1, 2, 3) and
    [Recipies].[Recipy ID] in (1, 2, 3) and
    [Material category].[Category ID] in (8, 9, 10, 11, 12, 13)
    and when i execute query it shows me error 
    The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Dimfact_Dimproduct". The conflict occurred in database "pp dw", table "dbo.Dimproduct", column 'Prod_ID'.
    ERD IS
    HOW TO SOLVE THIS PROBLEM?

    I cant see any join conditions in your query posted. Whats the purpose of the query above. It will just bring you a cartesian product (cross join) of tables involved subjected to filters. Are you sure this is the correct query?
    The error you're getting may be because you've not yet populated DimProduct or may be because of logic you used in popultaing DimProduct causing it to miss some records which is what query is referring to in above case.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Insert data into linked table

    Problem when you try to insert data into linked table.
    I made the view with all linked table columns (field1 is PK, field2, field3......) plus new primary key field "field1_PK" for tabular form wizard primary key field definition. After submit data on tabular form appears:
    "Error in mru internal routine:ORA-2001:Error in MRU: row=1,ORA-00957: duplicate column name ORA-02063:preciding line from "SHEMA_NAME", insert into "field1","field1_PK","field3",........) values (:b1,:b2,:b3.........)
    Error Unable to process update.
    Is it bug too?

    Hi,
    Have you tried to do your updates using an INSTEAD OF TRIGGER on your view? An INSTEAD OF TRIGGER allows you to update a non-updateable view.
    The following book contains an excellent introduction to this topic.
    "Oracle PL/SQL for Dummies"
    written by Rosenblum and Dorsey
    published by Wiley Publishing Inc.
    The following book is also excellant reference that deals with INSTEAD OF TRIGGERS.
    "Oracle PL/SQL programming
    written by Steven Feuerstein
    published by O'Reilly
    Hope this helps.
    Cheers,
    Patrick Cimolini

  • How to insert date into a table by selecting form sysdate

    Hi
    My Table format is like this
    SQL>desc log;
    Name Null? Type
    EMP_ID VARCHAR2(30)
    LOGIN DATE
    LOGOUT DATE
    now when ever an employee logs in i w'd like to insert date into the table.
    i put up the following query
    SQL> insert into log(emp_id,login)
    2 values
    3 ('Ed_01',
    4 select
    5 sysdate
    6 from dual
    7 );
    select
    ERROR at line 4:
    ORA-00936: missing expression
    I got the above error how can i rectify that plz suggest me very urgently as i have to submit my project very early to my boss.

    try this :
    insert into log(emp_id,login) values ('Ed_01', sysdate);

  • Error while selecting date from external table

    Hello all,
    I am getting the follwing error while selecting data from external table. Any idea why?
    SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
      2        SE_CUST_ID NUMBER(38),
      3        SE_TRAN_AMT_LCY FLOAT(126),
      4        SE_REVERSAL_MARKER VARCHAR2(255))
      5  ORGANIZATION EXTERNAL (
      6    TYPE ORACLE_LOADER
      7    DEFAULT DIRECTORY ext_tables
      8    ACCESS PARAMETERS (
      9      RECORDS DELIMITED BY NEWLINE
    10      FIELDS TERMINATED BY ','
    11      MISSING FIELD VALUES ARE NULL
    12      (
    13        country_code      CHAR(5),
    14        country_name      CHAR(50),
    15        country_language  CHAR(50)
    16      )
    17    )
    18    LOCATION ('SE2.csv')
    19  )
    20  PARALLEL 5
    21  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> select * from se2_ext;
    SQL> select count(*) from se2_ext;
    select count(*) from se2_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04043: table column not found in external source: SE_REF_NO
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

    It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
    HTH -- Mark D Powell --

  • How to insert data into a table only when data has changed its value (when compared to the previous inserted value)

    I wish to insert data into a table only when the value of the inserted data has changed. Thus, in a time series, if the value of the data at time, t-1, is 206 then if the data to be inserted at time t is 206, then it is skipped (not entered).
    If the value of the data at time t+1 is 206, it is skipped also; until the value changes, so if the value at t+1 was 205, then that would be inserted, and if at time t+2 the data is 206, it would be inserted too.
    What is the best way to do it without increasing overheads?

    This view works:
    SELECT
    i.IDNO,i.[Date],i.[Level]
    FROM
    mytable i
    INNER
    JOIN mytable
    d
    ON
    d.IDNO
    = i.IDNO-1
    WHERE
    i.[Level]
    <> d.[Level]
    on this mytable below.  A trigger could be quite useful here although I am cautious using them. However I wish to avoid the overhead by not having a temp table (which could be sizable).  mytable below
    should give 3 lines. The IDNO is an identity column.
    IDNO
    Item
    Date
    Level
    1
    X24
    12/23/13 10:41
    22996
    2
    X24
    12/23/13 10:41
    22996
    3
    X24
    12/23/13 9:21
    23256
    4
    X24
    12/23/13 9:21
    23256
    5
    X24
    12/23/13 9:22
    23256
    6
    X24
    12/23/13 9:22
    23256
    7
    X24
    12/23/13 9:22
    22916

Maybe you are looking for

  • Help in installation 9i

    Hello ! i want to install oracle 9iAS on Linux. I want to know that do i need to install oracle 9i database first or oracle 9iAS installs database automatically. Because when i was reading the documentation it was written that you need to make some c

  • Nv4_disp.dll BSOD Errors (solved by driver rollback)

    http://projectm.us/murc/planetside/BSOD2.jpg It happens whenever im running a game or program that uses a lota ram. Ive completly replaced my drivers (uninstall/reinstall) and im going to try the MSI drivers, does anyone know how to fix this crap?

  • Mhmodmhmod

    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes You can use iCloud or iTunes to back up the content on your iPhone, iPad, or iPod touch. When you have a backup, you can restore this content to your device anytime. Choose a

  • Exception in thread "main" java.lang.ClassFormat Error

    I am running a java program in NeBeans and when I run the program I am getting the following error: Exception in thread "main" java.lang.ClassFormatError: Repetitive method name/signature in class file pluginex2/TtsoapcgiPortType_addLink_ResponseStru

  • User Logon history

    Hi All. Does anyone know of a table or a function module that gives the logon history for a user? Table USR02 shows the last time a user logged on, but not any of the times before that. Thanks