Inserting row in Updateable Report

Hi all,
I have an updateable report that I can update no problem. However, when I try insert a record I get the following error ...
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "A884FA378C851786DDFE3A33709CB23C", item checksum = "37B04CEAA8C5C627F8FC74D27A1665C8"., update
I have isolated the error to the date field and I think the DML is doing something funky in the background.
Anyone had this problem or know how to get around it?
Thanks,
Russell

Check if all of your updatable columns are referencing the table columns properly.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------

Similar Messages

  • LOV with where clause containing a value from a row in an updateable report

    I have an updateable report in which a possible value of one column depends on the value of another. I want to use LOVs (there are two different possible), and per row choose which LOV I use, does anyone know if this is possible?
    Thanks
    Wendy

    Wendy - I see that you were able to use the correlated subquery technique (in your other post). This sounds like a slightly different problem but if your query uses the htmldb_item API, I think you could achieve your aim using this same method and decode.
    Scott

  • SQL Query updateable report with row selector. Update process.

    I have a SQL Query updateable report with the row selector(s).
    How would I identify the row selector in an update process on the page.
    I would like to update certain columns to a value of a select box on the page.
    Using the basic:
    UPDATE table_name
    SET column1=value
    WHERE some_column=some_value
    I would need to do:
    UPDATE table_name
    SET column1= :P1_select
    WHERE [row selector] = ?
    Now sure how to identify the [row selector] and/or validate it is checked.
    Thanks,
    Bob

    I don't have the apex_application.g_f01(i) referenced in the page source...In the page source you wouldn't find anything by that name
    Identify the tabular form's checkbox column in the page(firebug/chrome developer panel makes this easy)
    It should be like
    <input id="..." value="" type="checkbox" name="fXX" >we are interested in the name attribute , get that number (between 01 and 50)
    Replace that number in the code, for instance if it was f05 , the code would use
    apex_application.g_f05
    --i'th checked record' primary keyWhen you loop through a checkbox array, it only contains the rows which are checked and it is common practice to returns the record's primary key as the value of the checkbox(available as the the i'th array index as apex_application.g_f05(i) , where i is sequence position of the checked row) so that you can identify the record.

  • Apex 3.0 to 3.2, Updateable Reports & Row Selector Column?

    Good afternoon,
    (I searched the forum for both of these topics but didn't find an answer, it may be there and I missed it. If so, just point me in the right direction if you don't mind.)
    We just upgraded from 3.0.1.00.07 to 3.2.0.00.27.
    In 3.0 there was the option to select 'SQL Query (updateable report)' as a report type. I don't see that available now. What am I doing wrong?
    Also in 3.0, I would add a Row Selector column to a report by selecting 'SQL Query (updateable report)' as a report type, then clicking Row Selector in a side region to the right to add a row selector column, then I would change the report type back to SQL Query and the row selector column would remain. In 3.2 how do I get a row selector column added to a report?
    Thx, Tony

    But, yes, it can be installed with Forms & Reports Standalone. The http server with F&R ships with modplsql; that's all you need. Just configure a DAD as described in the documentation for setting it up with App Server.
    Anton

  • Can't delete row in updateable detail report in apex 4.0

    i build a master detail form.i insert record in master form and in detail updatable report. but when i delete record in the updatable report then message display 1 record delete but the record is still display in the updatable detail report.

    I request you not to keep starting new threads for the same problems while igonoring the earlier ones.
    If your question is not answered keep progressing the same thread.
    Your earlier thread on this subject, in case you have forgotten ti , is can't delete record in detail updateable report in apex
    Regards,
    Just in case you have not noticed this already , you can set your posts as "watched" automatically. heres how:
    1. Go to your Control Panel
    2. Click on "Your Settings"
    3. Set the two Radio button for wathc to Yes and save.
    Next time when you login you will be able to see your Watches on your Control Panel and in the main forum Thread List they will appear with binocular icon.
    Regads,
    Edited by: Prabodh on Aug 23, 2010 3:58 PM

  • Updateable  report  with CHECKBOX - Error in MRU: row= 1, ORA-01403:

    Hi All,
    Lets say I have a table tab_1 with column return_flg
    I have an updateable report - tabular form.
    For the return_flg column I have:
    I have Tabular Form Element attribs:
    Display As Standard Report Column
    Default Type No Default
    Default
    Reference Table Owner - no reference selected
    Reference Table Name TAB_1
    Reference Column Name RETURN_FLG
    But there is no CHECKBOX display type..so I used HTMLDB_ITEM.CHECKBOX in the SQL...
    Select ID, .....
    HTMLDB_ITEM.CHECKBOX(1,RETURN_FLG) "RETURNED"
    from tab_1 where order_id = '1'
    How do I get it to update with the MRU?
    I get Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01403: no data found, update TEMP_USER.TAB_1 set "ID" = :b1
    Thanks for the help, BillC
    Message was edited by:
    bcarlis_2000

    No, I had an updateable report that works great..
    Lets say
    Select ID, item_name
    from TAB_1 where ID = '1'
    Updates great!
    then added column to the table to track if item was returned.
    RETURNED_FLG
    changed select of same form to:
    Select ID, item_name
    from TAB_1 where ID = '1'
    HTMLDB_ITEM.CHECKBOX(1,RETURNED_FLG) "RETURNED"
    Now, it updates great IF the checkbox is not checked but gives the error if checked.

  • Inserting Rows in Reports for Unused Numbers

    Post Author: scarmike67
    CA Forum: General
    I have a report that lists our customer numbers and names.  Each row has a 3-digit customer number in the first column with the customer name in the second column.  When the customer numbers were created, many numbers were skipped.  How can I make my report include rows for the unassigned customer numbers?  I would like the report to include rows all customer numbers 1-999, and only the assigned numbers would have customer names next to them.  This will allow us to see the unused numbers.  For example, if numbers 123, 124, 126, and 128 were assigned to customers , I would like to also have rows on the report for the skipped 125 and 127 numbers.  I'm not sure what this 'feature' is called in order to search for help.  Thanks!

    Post Author: scarmike67
    CA Forum: General
    I have Crystal v8.5 and v10.  I could use either for this report.  It is an SQL database.  I would like to be able to handle it within the report instead of adding a new table or blank records to the existing table.  Thanks!

  • Insert a button on the last row of a report

    Hi all,
    my client wants an "add" button on the last row of any report that he has. I can do it easy on the first row (SELECT DECODE(rownum,1,'button','')), but I couldn't find a solution for this situation.
    Can anyone help me?
    Thanks in advance.
    Nelson Freitas

    Sorry, but I didn't quite understand the answer. Here's my example, a real one :)
    select     "SGP_DIS_ENT_ANO"."SCE_ID" as " ",
         "SGP_ANO_ESC"."SAE_ANO" as "Ano",
         "SGP_CUR"."SCU_DES" as "Curso",
         "SGP_DIS"."SDE_DES" as "Disciplina"
    from     "SGP_ANO_ESC" "SGP_ANO_ESC",
         "SGP_EST_ANO" "SGP_EST_ANO",
         "SGP_CUR" "SGP_CUR",
         "SGP_DIS" "SGP_DIS",
         "SGP_DIS_CUR" "SGP_DIS_CUR",
         "SGP_DIS_ENT_ANO" "SGP_DIS_ENT_ANO"
    where "SGP_DIS_ENT_ANO"."SDC_ID"="SGP_DIS_CUR"."SDC_ID"
    and     "SGP_DIS_CUR"."SDE_ID"="SGP_DIS"."SDE_ID"
    and     "SGP_DIS_CUR"."SCU_ID"="SGP_CUR"."SCU_ID"
    and     "SGP_DIS_ENT_ANO"."SEA_ID"="SGP_EST_ANO"."SEA_ID"
    and     "SGP_EST_ANO"."SAE_ID"="SGP_ANO_ESC"."SAE_ID"
    and "SGP_DIS_ENT_ANO"."SEN_ID" = :P19_SEN_ID
    Could you help me with it?
    Thanks

  • Multiple rows for 1 detail line of data in an updateable report

    I have an end user that wants all data displayed to fit within the frame(No scrolling to the right). The
    problem is there is too much data.
    In the updateable report I have
    Col1- ---Col2--- ---Col3--- ---Col4--- ---Col5--- ---Col6---
    Is it possible to have 2 lines - like this:
    record 1 ---Col1--- ---Col2--- ---Col3---
    ---Col4--- ---Col5--- ---Col6---
    record 2 ---Col1--- ---Col2--- ---Col3---
    ---Col4--- ---Col5--- ---Col6---
    Any assistance will be appreciated.
    Shelly

    Hi Shelly,
    If you haven't already, you might want to try playing with different Report Templates (e.g. 100% width) and also CSS field formatting like nowrap and fixed widths to get what you want.
    Cheers,
    Mike

  • Region sql query(updateable report) data entry in non db columns

    In a tabular report type updateable report
    What is the best way to provide data entry into a non db column a) (to accept parameters for some on demand pl/sql processes)?
    Only when setting a) as a standard report column the db insert/update transaction can be processed
    When changing a) to text field the db insert/update transaction fails with en error (screen/db are not in sync which is not actually the case)
    a) should not be part of the db insert/update transactions but still allow data entry
    How can this be achieved?
    Thanks
    Peter

    Hi Peter,
    I think the easiest solution is to use an updateable view instead of the direct table access.
    Here is an example:
    CREATE OR REPLACE VIEW V_EMPLOYEES
    AS
    SELECT EMPLOYEE_ID
         , FIRST_NAME
         , LAST_NAME
         , FIRST_NAME||' '||LAST_NAME AS FULL_NAME
      FROM EMPLOYEES
    CREATE OR REPLACE TRIGGER TRG_V_EMPLOYEES
        INSTEAD OF INSERT OR UPDATE OR DELETE
        ON V_EMPLOYEES
        REFERENCING NEW AS new OLD AS old
        FOR EACH ROW
    BEGIN
        IF UPDATING
        THEN
            UPDATE EMPLOYEES
               SET FIRST_NAME = :new.FIRST_NAME
                 , LAST_NAME  = :new.LAST_NAME
             WHERE EMPLOYEE_ID = :old.EMPLOYEE_ID
        -- insert and delete is not allowed
        ELSIF INSERTING
        THEN
            NULL; -- there would be a insert code
        ELSIF DELETING
        THEN
            NULL; -- there would be the delete code
        END IF;
    END;
    /FIRST_NAME||' '||LAST_NAME AS FULL_NAME in the example view simulates your function call.
    There might be a possibility to do it in APEX as well, but that was the first solution which came into my mind.
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com
    Check out the ApexLib Framework: http://apexlib.sourceforge.net

  • SQL Query Updateable Report Error on Submit

    I'm using AppX version 2.0.0.00.49 and have modified a standard SQL report into an updateable report that modifies the value of a single column. When I submit the page, I receive this error:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "A1C24045A4B826FBB8E8D7CB176F7B41", item checksum = "B31829463D576B930C07388D06AE91D8"., update "BNELSON"."TWP_REG_STU_ATT" set "REG_ATT_ID" = :b1
         Error      Unable to Process Absences
    The table is being updated only - no create or delete, and the report elements of Tabular Form Element contain the info to point to this table and its primary key. The sql query does link to several related tables to display their related items.
    Any pointers as to what I should look for as a cause?

    Chris,
    I created a new page with a tabular form update using just the single table with all DML types (Add, Delete, Save), and for all fields.
    Ran the page and tried modifying a field on one row and saved - result,
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01407: cannot update ("BNELSON"."TWP_REG_STU_ATT"."ATT_DT") to NULL, update "BNELSON"."TWP_REG_STU_ATT" set "REG_ATT_ID" = :b1, "STU_ID" = :b2, "ATT_DT" = :b3, "PERIOD" = :b4, "CLASS_DAY_TYP" = :b5, "TCHR_ATT_CD" = :b6, "TCHR_ID" = :b7, "CRSE_ID" = :b8, "CREATE_DT" = :b9, "CREATED_BY" = :b10, "UPDATE_DT" = :b11, "UPDATED_BY" = :b12, "SCH_ID" = :b13, "TCHR_UPDATE_DATE" = :b14 where "REG_ATT_ID" = :p_pk_col
         Error      Unable to process update.
    OK
    Tried adding a new row with the same results basically -
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01400: cannot insert NULL into ("BNELSON"."TWP_REG_STU_ATT"."ATT_DT"), insert into "BNELSON"."TWP_REG_STU_ATT" ( "REG_ATT_ID", "STU_ID", "ATT_DT", "PERIOD", "CLASS_DAY_TYP", "TCHR_ATT_CD", "TCHR_ID", "CRSE_ID", "CREATE_DT", "CREATED_BY", "UPDATE_DT", "UPDATED_BY", "SCH_ID", "TCHR_UPDATE_DATE") values ( :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8, :b9, :b10, :b11, :b12, :b13, :b14)
         Error      Unable to process update.
    OK      
    Field ATT_DT had valid date values in both scenarios (12-DEC-06), so why would it be attempting to put a null in both update and insert modes?

  • Change "SQL Query" report to "SQL Query (updateable report)" report?

    I manually made a report, because the tabular report made by the wizard gave me no possibility to use a popup LOV. Now I have this report, but I cant apply an MRU process on it, becuase it's not an "SQL Query (updateable report)". How can I change my report to a "SQL Query (updateable report)"? I only can choose between SQL Query and SQL QUERY (PL/SQL function body returning SQL query).

    Hi Tom
    You can just write the processes yourself. Although trickier this can give you a lot more control over row processing.
    APEX_APPLICATION.G_F01, F02 etc are global variables in the apex_application package that are defined as arrays.
    These are regularly used in tabular forms to reference values within them. The normal ordering would be column 1 = G_F01, column 2 = G_F02 etc etc. Although you can change these and even assign more than one column to an array.
    The example
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    INSERT INTO my_table VALUES(:P1_EMPID , APEX_APPLICATION.G_F01(i));
    END LOOP;Is saying - for the number of values in the array G_F01 (probably column 1) loop insert into the table the value of the associated value in the array. So first time through i=1 - so the first value in the array (probably row 1 in column 1), next time i=2 so the second value in the array is used (probably row 2 in column 1) and so on...
    When you've created a manual tabular form (what I would call what you've done) you have created the items using the APEX_ITEM package in your query. The first parameter for this is p_idx which defines which global array to hold it in.
    Cheers
    Ben

  • How to insert row where DB date field has default value.

    APEX 4.1, Oracle 11.2
    I'm trying to insert a row using "javascript:addRow();" where the report query is an SQL Query (Updateable Report).
    1)  Several of the fields are display-only with defaulted values.
    2)  No problem with the VARCHAR2 fields.
    3)  And if RUN_DT is a text field, the insert works.
    4)  But I get errors when trying to make RUN_DT (DD-MON-YYYY) display-only and default it to P63_RUN_DT.  I display P63_RUN_DT so I see it is correct.
    Now, this is not a new question.  See:
    Error inserting sysdate with time in tabular form region  https://forums.oracle.com/thread/2551916  (Not answered)
    Date value in tabular form  https://forums.oracle.com/thread/2478358 (Not answered)
    Help! Unable to set default date value for Tabular form DB date field! https://forums.oracle.com/thread/2473208  (Not answered)
    Default Value Date Picker Field https://forums.oracle.com/thread/2468973  (Not answered)
    Tabular Form Default Value PL/SQL https://forums.oracle.com/thread/2464192  (Not answered)
    Display 1st region invoice date into tabular form invoice date column. https://forums.oracle.com/thread/2458561  (Not answered)
    Default System date and time in Tabular form https://forums.oracle.com/thread/2449615 (Not answered)
    Setting default value of Tabular form item is not working https://forums.oracle.com/thread/2396024 (Not answer)
    apex tabular form https://forums.oracle.com/thread/2337098 (Not answered)
    Various folks recommended using Default PL/SQL and SYSDATE when SYSDATE was the desired default value.  That worked for some and not for others.  I could not get it to work for me.  The errors I receive are "•Column must have a value. (Row 1) " and "ORA-01410: invalid ROWID".   I believe the ROWID error is an example of spurious error cascade caused by the RUN_DT problem.   I believe it will disappear once the RUN_DT problem is solved.
    I will try to replicate on apex.oracle.com
    Thoughts?
    Howard

    Update: At least in my case, it seems the RUN_DT date column cannot be Standard Report Column.  I made it "Display as Text (saves state)".  Standard Report Column works for the defaulted VARCHAR2 columns.  Go figure! 
    (more)  And I could not get it to work with "Item" (P63_RUN_DT) as the Default.   However, it seems to work -- so far -- using Default PL/SQL of TO_DATE(:P63_RUN_DT,'DD-MON-YYYY').

  • Disabling the dropdown LOV for existing records in SQL updateable report

    Hi All -
    I have a SQL updateable report which has 3 columns. One of the column is a named-LOV. This report also provides the functionality of inserting new rows.
    Is there a way to only show the named-LOV dropdown list for only the new records to be inserted i.e. when we click on "Add Row". For existing records, I donot want to show the dropdown.
    Please provide your thoughts.
    Thanks,
    -Seenu

    Thanks Robert -
    I guess I didn't put my question right in my earlier posting.
    Basically this report provides updates and inserts both (Its a SQL Updateable report)
    One of the column is a Named-LOV (select list dropdown). For the existing records shown in this report, this select list should be disabled. But for the new records while inserting a new row into this report, the select list dropdown should be shown to the user with an option to choose values from selectlist.
    Thanks,
    -Seenu

  • Problems looping selected rows in a report

    Hi,
    I have a report on my form, of type SQL Query (updateable report), that I populate using the following SQL:
    SELECT APEX_ITEM.CHECKBOX(1,prvidd,'CHECKED') " ", prvidd, prvnme, prvlev
    FROM vu_roleprivs
    WHERE rolidd = :P32_ROLIDD
    The first two columns are hidden, so that when it comes to inserting/updating then all rows will be processed (this is a requirement).
    I use the following process to loop through the report rows...
    DECLARE
    vROW VARCHAR2(4000);
    prvIDD NUMBER;
    prvLEV VARCHAR2(3);
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    vROW := APEX_APPLICATION.G_F01(i);
    prvIDD := APEX_APPLICATION.G_F02(vROW);
    prvLEV := APEX_APPLICATION.G_F04(vROW);
    -- Delete the current row from PDROLPRV
    DELETE FROM pdrrolprv WHERE rolidd1 = :P32_ROLIDD and prvidd1 = prvIDD;
    -- Now insert the record from the table row
    INSERT INTO pdrrolprv VALUES(:P32_ROLIDD, prvIDD, prvLEV);
    END LOOP;
    END;
    ... but when the process runs I get the following error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I can't see where I am going wrong - can anyone help, would be much appreciated.
    Best regards
    Simon

    Hi Simon,
    This might be stating the obvious, but first up I would determine exactly where the code is failing by putting dummy values instead of variables into the following statements: -
    DELETE FROM pdrrolprv WHERE rolidd1 = :P32_ROLIDD and prvidd1 = prvIDD;
    INSERT INTO pdrrolprv VALUES(:P32_ROLIDD, prvIDD, prvLEV);
    Assuming the code then runs correctly, start putting your variables back 1 by 1 until you find the failure. You might also want to dump out your variable values: -
    vROW := APEX_APPLICATION.G_F01(i);
    prvIDD := APEX_APPLICATION.G_F02(vROW);
    prvLEV := APEX_APPLICATION.G_F04(vROW);
    to a test table.
    Hope that helps. Give me a shout if you're still having trouble.
    Mike

Maybe you are looking for