Timeout when inserting row in a locked table

How can I set the timeout before an INSERT statement fails with error ORA-02049 (timeout: distributed transaction waiting for lock) when the entire table has been lock with LOCK TABLE .
Documentation says to modify DISTRIBUTED_LOCK_TIMEOUT parameter, but it is obsolete in Oracle 8i.
Any idea ???

You could set an alarm() in a signal. Then on return (for whatever reason) you clear the alarm, inspect the return code of the sql execute call and determine what happened (i.e. did the transaction completed or did the alarm get you).
Hope it helps.
-Lou
[email protected]
How can I set the timeout before an INSERT statement fails with error ORA-02049 (timeout: distributed transaction waiting for lock) when the entire table has been lock with LOCK TABLE .
Documentation says to modify DISTRIBUTED_LOCK_TIMEOUT parameter, but it is obsolete in Oracle 8i.
Any idea ???

Similar Messages

  • Validations when inserting records into database using table control?

    hi , guru's.
          iam inserting records into database table through table control when i press insert i want check which record is existing and which is not . so please give me any sample code
    regards,
    satheesh.

    hi , arjun.
    please check this code.
        WHEN 'INSERT'.
        data: g_vcontrol_itab1 like table of zcust_call_rec,
              g_vcontrol_wa1 like g_vcontrol_wa.
         SELECT *  FROM zcust_call_rec
                   INTO CORRESPONDING FIELDS OF TABLE g_vcontrol_itab1
                   FOR ALL ENTRIES IN g_vcontrol_itab
                   WHERE kunnr = g_vcontrol_itab-kunnr AND budat = g_vcontrol_itab-budat.
            loop at g_vcontrol_itab into g_vcontrol_wa.
               read table g_vcontrol_itab1 into g_vcontrol_wa1
                    with table key  g_vcontrol_wa-kunnr = kunnr and g_vcontrol_wa-budat = budat.
                     if sy-subrc = 0.
                       delete g_vcontrol_itab.
                     endif.
            endloop.
          LOOP AT g_vcontrol_itab INTO g_vcontrol_wa.
            INSERT into zcust_call_rec values g_vcontrol_wa.
          ENDLOOP.
    with this iam getting error message like this.
              <b>g_vcontrol_wa-budat is not expected.</b>

  • Runtime error when inserting rows in hrp1018 and hrt1018 tables

    Hi All,
    I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
    *****************************************code***************************************************************
    << Please post only the relevant portion of the code >>
    The runtime error which is coming is as follows:
    Error analysis
        An internal error in the database interface occurred during access to
        the data of table "HRT1018 ".
        The situation points to an internal error in the SAP software
        or to an incorrect status of the respective work process.
        For further analysis the SAP system log should be examined
        (transaction SM21).
        For a precise analysis of the error, you should supply
        documents with as many details as possible.
    Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
    Thanks in advance,
    BBKrishna.
    Edited by: Rob Burbank on Jun 9, 2009 1:31 PM

    I am adding the code once again.Please let me know why the error is coming up.
    lv_mproj = 'BLDNG'.
      wa_p1018-mandt = sy-mandt.
      wa_p1018-otype = '9M'.
      wa_p1018-objid = '50009650'.
      wa_p1018-begda = '20090608'.
      wa_p1018-endda = '99991231'.
      wa_p1018-infty = '1018'.
      wa_p1018-plvar = '01'.
      wa_p1018-otype = '9M'.
      wa_p1018-istat = '1'.
      append wa_p1018 to it_p1018.
      repid = sy-repid.
    *Updating hrp1018 and hrt1018 tables
      CALL FUNCTION 'RH_INSERT_INFTY'
        EXPORTING
        FCODE                     = 'INSE'
        VTASK                     = 'D'
         AUTHY                    = ' '
          REPID                   =  repid
          FORM                    = 'FILL_TABS'
        TABLES
          INNNN                   = it_p1018
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
      IF SY-SUBRC <> 0.
        CALL FUNCTION 'BALW_BAPIRETURN_GET'
          EXPORTING
            TYPE                             = SY-MSGTY
            CL                               = sy-msgid
            NUMBER                           = SY-MSGNO
      PAR1                             = ' '
      PAR2                             = ' '
      PAR3                             = ' '
      PAR4                             = ' '
      LOG_NO                           = ' '
      LOG_MSG_NO                       = ' '
         IMPORTING
           BAPIRETURN                        = return_rec
    EXCEPTIONS
      ONLY_2_CHAR_FOR_MESSAGE_ID       = 1
      OTHERS                           = 2
        IF SY-SUBRC <> 0.
            lv_mproj = text-011
                      ELSE.
                      ii_return = return_rec.
                      CONCATENATE                  ii_return-type '-' ii_return-message
                      INTO lv_err_msg SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
    *RHCD_TAB-PROZT
       FORM fill_tabs TABLES ins_tab
                   USING ins_set ins_index.
      DATA : BEGIN OF set.
              INCLUDE STRUCTURE wplog.
      DATA : END   OF set.
      DATA: BEGIN OF h_pt1018.             "to initialize INS_TAB
              INCLUDE STRUCTURE pt1018.
      DATA: END OF h_pt1018.
      REFRESH ins_tab.
      set = ins_set.
      CASE set-infty.
        WHEN '1018'.
          h_pt1018-posnr = lv_mproj.
          h_pt1018-prozt = '100.00'.
          IF NOT ( h_pt1018 IS INITIAL ).
            CLEAR ins_tab.
            ins_tab+36(8) = lv_mproj. "h_pt1018.
            ins_tab+134(5) = '100.00'.
            APPEND ins_tab.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • Programming insert row VO,but inner-table no data show?

    We have Master-Detail-Detail ViewObject,when programming insert row three ViewObject,why inner-table UI no data show?
    [Source Code ZIP files|http://docs.google.com/leaf?id=0B1l5uiKPTIr_ZTQwYTQ1MTMtZWFlMS00YWQ1LWFiZWQtYzNmODIwNDRlZWJk&hl=zh_TW]
    1.SmpTest0PG.xml click button.
    2.SmpTest0CO.java call MyTestAMImpl.java create Method insert row three ViewObject.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("Test") != null)
    String key = "1";
    Serializable aserializable1[] = { key };
    String quote_id = (String)am.invokeMethod("create", aserializable1);
    if (!quote_id.equals(null))
    pageContext.setForwardURL("OA.jsp?page=/smp/oracle/apps/pos/test/webui/SmpTestPG&Key="+key,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    3.SmpTest0CO.java Forward SmpTestPG.xml.
    4.SmpTestPG.xml Show Data.
    MyTestAMImpl.java
    public String create(String key)
    int vendor_id = 0;
    String vendor_name = null;
    int contact_id = 0;
    int site_id = 0;
    String quote_id = null;
    OADBTransaction trx = (OADBTransaction)((OAApplicationModuleImpl)this).getDBTransaction();
    SmpPoHdVOImpl hdvo = getSmpPoHdVO();
    SmpPoDlVOImpl dlvo = getSmpPoDlVO();
    SmpPoDkVOImpl shvo = getSmpPoDkVO();
    if (!hdvo.isPreparedForExecution())
    hdvo.setWhereClause("1 = 0");
    hdvo.setMaxFetchSize(0);
    hdvo.executeQuery();
    if (!dlvo.isPreparedForExecution())
    dlvo.setWhereClause("1 = 0");
    dlvo.setMaxFetchSize(0);
    dlvo.executeQuery();
    if (!shvo.isPreparedForExecution())
    shvo.setWhereClause("1 = 0");
    shvo.setMaxFetchSize(0);
    shvo.executeQuery();
    String s = key;
    Serializable aserializable[] = { s };
    SmpViewPoHdVOImpl quhdvo = getSmpViewPoHdVO();
    if(quhdvo != null)
    quhdvo.invokeMethod("initQuery", aserializable);
    SmpViewPoDlVOImpl qudlvo = getSmpViewPoDlVO();
    // insert hd
    quhdvo.setRangeSize(-1);
    Row quhdrow[] = quhdvo.getAllRowsInRange();
    for(int i = 0; quhdrow != null && i < quhdrow.length; i++)
    Row hdrow = hdvo.createRow();
    hdrow.setAttribute("DocNum","200");
    hdvo.insertRow(hdrow);
    hdrow.setNewRowState(Row.STATUS_NEW);
    quote_id = hdrow.getAttribute("HEADER_ID").toString();
    // insert dl
    RowIterator dlIter = (RowIterator)quhdrow.getAttribute("SmpViewPoDlVO");
    dlIter.setRangeSize(-1);
    Row qudlrow[] = dlIter.getAllRowsInRange();
    int line_seq = 0;
    for(int j = 0; qudlrow != null && j < qudlrow.length; j++)
    Row dlrow = dlvo.createRow();
    line_seq ++;
    dlrow.setAttribute("LineNum",String.valueOf(line_seq));
    dlrow.setAttribute("ItemNo",qudlrow[j].getAttribute("ItemNo"));
    dlrow.setAttribute("Qty",qudlrow[j].getAttribute("Qty"));
    dlvo.insertRow(dlrow);
    dlrow.setNewRowState(Row.STATUS_NEW);
    // insert shipment
    RowIterator shipIter = (RowIterator)qudlrow[j].getAttribute("SmpViewPoDkVO");
    shipIter.setRangeSize(-1);
    Row shipRow[] = shipIter.getAllRowsInRange();
    int ship_seq = 0;
    for(int k = 0; shipRow != null && k < shipRow.length; k++)
    ship_seq ++;
    Row shrow = shvo.createRow();
    shrow.setAttribute("ShipmentNum",String.valueOf(ship_seq));
    shrow.setAttribute("Qty",shipRow[k].getAttribute("Qty"));
    shvo.insertRow(shrow);
    shrow.setNewRowState(Row.STATUS_NEW);
    return quote_id;
    Edited by: Tony_Huang on Apr 10, 2010 3:59 PM

    public class SmpTestCO extends OAControllerImpl
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OATableBean oatablebean = (OATableBean)webBean.findChildRecursive("SmpPoDlVORN");
    OATableBean oatablebean1 = (OATableBean)webBean.findChildRecursive("SmpPoDkVORN");
    if (oatablebean != null)
    oatablebean.setAttributeValue(UIConstants.ALL_DETAILS_ENABLED_ATTR, ((Object) (Boolean.TRUE)));
    oatablebean.setAttributeValue(OAWebBeanConstants.VIEW_LINK_NAME, "SmpPoDlDkVL1");
    if (oatablebean1 != null)
    oatablebean1.setAttributeValue(OAWebBeanConstants.VIEW_LINK_NAME, "SmpPoDlDkVL1");
    oatablebean1.setInsertable(true);
    oatablebean1.setAutoInsertion(true);
    }

  • Error when insert data in Sql Server table(DateTime data type)

    Hello all,
    I have created a database link in oracle 11g to SQL Server 2008 using Sqlserver gateway for oracle,Oracle run on Linux and SQL Server run on Windows platform.
    I have queried a table and it fetches rows from the target table.
    I am using this syntax for insert a row in Sql Server table.
    Insert into Prod@sqlserver (NUMITEMCODE, NUMPREOPENSTOCK, NUMQNTY, NUMNEWOPENSTOCK, DATPRODDATE , TXTCOMPANYCODE, "bolstatus", NUMRESQNTY )
    Values (1118 , 1390.0 , 100.0 ,1490 , '2012-06-23 12:37:58.000','SFP' ,0 , 0 );
    but it give me error on DATPRODDATE,The data type of DATPRODDATE column in Sql Server is DATETIME.
    My Question is how can i pass the date values in INSERT statement for Sql Server DateTime data type.
    Regards

    Just as with Oracle, you have to specify the date using the to_date() function or use the native date format for the target database (if you can figure out what that is). This is good practice anyway and a good habit to get into.

  • Compare 2 tables and insert rows missing in each table.

    I have a tough situation. I have two exact tables- one online and one offline database. I know that there are missing rows of data from each table, so I need to make a comparison of one table and insert rows that do not exist. I was thinking to try this, but it took over 3 hours to run and did not return anything:
    insert into t
    select * from t a
    where not exists (select * from [email protected] b
    where a.col1 != b.col1
    and a.col2 != b.col2
    and a.col3 != b.col3);
    and it goes on for another 7columns.
    The trouble I have is to include a date clause so that the query can be broken down into running only a few months of data comparisions at a time- the records go back 4 years to compare. Also is there a way to write this so that it will query both tables at the same time in order to speed things up- or is one table at a time the best advice? Each table has over 100 million records to compare, that's why I was hoping to use a date criteria since one column is date.
    Let me know what you advise to make this work, I hope I was on the right track.

    Not sure if the MINUS operator will perform better with your data set but;
    SQL> create table t1 (some_id number, some_date date)
    Table created.
    SQL> create table t2 (some_id number, some_date date)
    Table created.
    SQL> insert into t1 values (1, trunc(sysdate))
    1 row created.
    SQL> insert into t1 values (2, trunc(sysdate-5))
    1 row created.
    SQL> insert into t1 values (4, trunc(sysdate-90))
    1 row created.
    SQL> insert into t2 values (1, trunc(sysdate))
    1 row created.
    SQL> insert into t2 values (3, trunc(sysdate-10))
    1 row created.
    SQL> insert into t2 values (5, trunc(sysdate-100))
    1 row created.
    SQL> select * from t1
       SOME_ID SOME_DAT
             1 07-07-30
             2 07-07-25
             4 07-05-01
    3 rows selected.
    SQL> select * from t2
       SOME_ID SOME_DAT
             1 07-07-30
             3 07-07-20
             5 07-04-21
    3 rows selected.
    SQL> insert into t1 (
       select some_id, some_date from t2 where some_date between sysdate-50 and sysdate
       minus
       select some_id, some_date from t1 where some_date between sysdate-50 and sysdate)
    1 row created.
    SQL> insert into t2 (
       select some_id, some_date from t1 where some_date between sysdate-50 and sysdate
       minus
       select some_id, some_date from t2 where some_date between sysdate-50 and sysdate)
    1 row created.
    SQL> select * from t1
       SOME_ID SOME_DAT
             1 07-07-30
             2 07-07-25
             4 07-05-01
             3 07-07-20
    4 rows selected.
    SQL> select * from t2
       SOME_ID SOME_DAT
             1 07-07-30
             3 07-07-20
             5 07-04-21
             2 07-07-25
    4 rows selected.

  • Ttitle not displaying the title when no rows selected from a table

    My requirement is display the Ttitle value even when there are no rows fetched from a table. I tried the following -it didn't work. We are on Oracle 9.2.0.7.0. Anybody has thoughts on this... your help greatly appreciated.
    ORACLE_SID = [oracle] ? ABCDE
    PSDEVDB1:>sqlplus babu
    SQL*Plus: Release 9.2.0.7.0 - Production on Mon Jul 10 17:56:52 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Enter password:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    SQL> ttitle center 'testing'
    SQL> column x noprint
    SQL> select 'x' x from dual;
    testing
    SQL> select *from mytable3;
    testing
    NAME NO
    KUMAR 10
    RAMU 10
    BABU 10
    SQL> select *from mytable3 where no=20;
    no rows selected
    SQL>

    If your concepts are clear for Right outer join, Left outer join and Full outer join you can achieve what you are looking for.
    http://www.oreillynet.com/pub/a/network/2002/04/23/fulljoin.html
    Play with the data and may the force be with you.

  • Loop Cursor Fetch Insert Rows Into Global Temporay Table

    Hi friends,
    I want to know there where is the problem in my this query
    cursor c1 is select empno
    from scott.emp;
    b number;
    begin
    open c1;
         loop
         fetch c1 into b;
         exit when c1%notfound;
    insert into scheema.a1
    (a)
    values
    (b);
    commit;
         end loop;
         close c1;
    end;
    There is no any error displaying while proceeding this query but the table a1 which is (Global temporary table with ON COMMIT PRESERVE ROWS option enabled) does not gets any records. Kindly let me know the problem.
    Regards.

    Are you sure that the query returns date? Are you checking the table via the same session?
    SQL> create global temporary table a1 (
      a  number)
      on commit preserve rows
    Table created.
    SQL> declare
       cursor c1 is select empno
          from scott.emp;
       b number;
    begin
       open c1;
       loop
          fetch c1 into b;
          exit when c1%notfound;
          insert into a1
          (a)
          values
          (b);
          commit;
       end loop;
       close c1;
    end;
    PL/SQL procedure successfully completed.
    SQL> select * from a1
             A
          7369
          7499
          7521
          7566
          7654
          7698
          7782
          7788
          7839
          7844
          7876
          7900
          7902
          7934
    14 rows selected.

  • Inserting rows in a database table using JDBC

    Hi,
    I am trying to insert a row in a table using the follwing code:
    String Query_String = "Insert into Table_Name (Field_1, Field_2, Field_3)" +
    "Values (Value_1, Value_2, Value_3)";
    stmt.executeUpdate (Query_String);
    Field_1 is a Date field, Field_2 is a String, and Field_3 is an integer.
    Any of the fields could be null. If the user does not enter a value for any
    one of these fields what would be the values for
    Value_1, Value_2, or Value3 in the Query_String?
    Thanks.

    Hi,
    I am trying to insert a row in a table using the
    follwing code:
    String Query_String = "Insert into Table_Name
    (Field_1, Field_2, Field_3)" +
    "Values (Value_1,
    "Values (Value_1, Value_2, Value_3)";
    stmt.executeUpdate (Query_String);
    Field_1 is a Date field, Field_2 is a String, and
    Field_3 is an integer.
    Any of the fields could be null. If the user does not
    enter a value for any
    one of these fields what would be the values for
    Value_1, Value_2, or Value3 in the Query_String?
    Thanks.Keep in mind that each database server probably has their own way of storing date values. For now, I'm going to assume that you're going to be using MySQL.
    // Initialize variables to null
    String Value_1 = "";
    String Value_2 = "";
    String Value_3 = "";
    try
    // Get Date
    Date date = new Date();
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    Value_1 = dateFormat.format(date);
    // Get String value
    Value_2 = "some string";
    // Get Integer value
    Value_3 = String.valueOf("2");
    String query = INSERT INTO T_NAME VALUES('" + Value_1 +"', '" + Value_2 + "', '" + Value_3 + "');
    int iUpdated = stmt.executeUpdate(query);
    catch(Exception e)
    // Catch Code
    System.out.println("Number of records updated: " + iUpdated);
    This will just enter empty string values if the strings are empty.
    Is this what you wanted to know?
    If not, provide a bit more information and I'll try to help as best as I can

  • Inserting rows in PL/SQl table

    Hi,
    I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row in the table. Can I insert the row in the pl/sql table within the loop without affecting the 'FOR i IN tab.first..tab.last' loop ??
    Also what would be the index of such a row inserted in the table. Can I access it with tab.last+1 (doesnt look like it can be done if i insert in the various levels of loops).
    OR
    If I insert the rows insde the nested loops , then I can access the new rows once I close all the loops and open a fresh loop ??. Will the new rows be at the last of the table.
    Any help will be appreciated ...

    user2309906 wrote:
    Hi,
    I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row in the table. Can I insert the row in the pl/sql table within the loop without affecting the 'FOR i IN tab.first..tab.last' loop ??
    Also what would be the index of such a row inserted in the table. Can I access it with tab.last+1 (doesnt look like it can be done if i insert in the various levels of loops).
    OR
    If I insert the rows insde the nested loops , then I can access the new rows once I close all the loops and open a fresh loop ??. Will the new rows be at the last of the table.
    Any help will be appreciated ...With an associative array:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    type t_arr is table of varchar2(10) index by pls_integer;
      3    v_arr t_arr;
      4    v_cnt number := 0;
      5  begin
      6    -- populate the associative array
      7    for i in (select ename from emp)
      8    loop
      9      v_cnt := v_cnt + 1;
    10      dbms_output.put_line('Populating: '||i.ename);
    11      v_arr(v_cnt) := i.ename;
    12    end loop;
    13    -- now process the associative array
    14    for i in v_arr.first .. v_arr.last
    15    loop
    16      dbms_output.put_line('Processing: '||i||':'||v_arr(i));
    17      if v_arr(i) IN ('KING','TURNER','JAMES') then
    18        v_arr(v_arr.last+1) := v_arr(i)||to_char(i);
    19        dbms_output.put_line('Added: '||v_arr.last||':'||v_arr(i));
    20      end if;
    21    end loop;
    22    -- now what's in the associative array?
    23    for i in v_arr.first .. v_arr.last
    24    loop
    25      dbms_output.put_line('Result: '||i||':'||v_arr(i));
    26    end loop;
    27* end;
    SQL> /
    Populating: SMITH
    Populating: ALLEN
    Populating: WARD
    Populating: JONES
    Populating: MARTIN
    Populating: BLAKE
    Populating: CLARK
    Populating: SCOTT
    Populating: KING
    Populating: TURNER
    Populating: ADAMS
    Populating: JAMES
    Populating: FORD
    Populating: MILLER
    Processing: 1:SMITH
    Processing: 2:ALLEN
    Processing: 3:WARD
    Processing: 4:JONES
    Processing: 5:MARTIN
    Processing: 6:BLAKE
    Processing: 7:CLARK
    Processing: 8:SCOTT
    Processing: 9:KING
    Added: 15:KING
    Processing: 10:TURNER
    Added: 16:TURNER
    Processing: 11:ADAMS
    Processing: 12:JAMES
    Added: 17:JAMES
    Processing: 13:FORD
    Processing: 14:MILLER
    Processing: 15:KING9
    Processing: 16:TURNER10
    Processing: 17:JAMES12
    Result: 1:SMITH
    Result: 2:ALLEN
    Result: 3:WARD
    Result: 4:JONES
    Result: 5:MARTIN
    Result: 6:BLAKE
    Result: 7:CLARK
    Result: 8:SCOTT
    Result: 9:KING
    Result: 10:TURNER
    Result: 11:ADAMS
    Result: 12:JAMES
    Result: 13:FORD
    Result: 14:MILLER
    Result: 15:KING9
    Result: 16:TURNER10
    Result: 17:JAMES12
    PL/SQL procedure successfully completed.With standard array (PL/SQL table):
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    type t_arr is table of varchar2(10);
      3    v_arr t_arr;
      4    v_cnt number := 0;
      5  begin
      6    -- populate the pl/sql table
      7    select ename bulk collect into v_arr from emp;
      8    -- now process the pl/sql table
      9    for i in v_arr.first .. v_arr.last
    10    loop
    11      dbms_output.put_line('Processing: '||i||':'||v_arr(i));
    12      if v_arr(i) = 'KING' then
    13        v_arr.extend;
    14        v_arr(v_arr.last) := 'PRESIDENT';
    15      end if;
    16    end loop;
    17    -- now what's in the pl/sql table?
    18    for i in v_arr.first .. v_arr.last
    19    loop
    20      dbms_output.put_line('Result: '||i||':'||v_arr(i));
    21    end loop;
    22* end;
    SQL> /
    Processing: 1:SMITH
    Processing: 2:ALLEN
    Processing: 3:WARD
    Processing: 4:JONES
    Processing: 5:MARTIN
    Processing: 6:BLAKE
    Processing: 7:CLARK
    Processing: 8:SCOTT
    Processing: 9:KING
    Processing: 10:TURNER
    Processing: 11:ADAMS
    Processing: 12:JAMES
    Processing: 13:FORD
    Processing: 14:MILLER
    Processing: 15:PRESIDENT
    Result: 1:SMITH
    Result: 2:ALLEN
    Result: 3:WARD
    Result: 4:JONES
    Result: 5:MARTIN
    Result: 6:BLAKE
    Result: 7:CLARK
    Result: 8:SCOTT
    Result: 9:KING
    Result: 10:TURNER
    Result: 11:ADAMS
    Result: 12:JAMES
    Result: 13:FORD
    Result: 14:MILLER
    Result: 15:PRESIDENT
    PL/SQL procedure successfully completed.
    SQL>So, in answer to your questions...
    Inserting additional rows in the array during the loop will effect the "last" value and alter the array. If you need to avoid this effect, store the "last" value in a variable and loop up to that value of the variable.
    New rows will generally be additional rows on the end of the array unless you are using associative arrays which will then depend on how you reference the rows in the array.

  • Inserting Rows in an Editable Table

    Application Focus: JSF with ADF/BC.
    watching Steve Muench´s Screencast on "Creating an Editable Table with a Dropdown List in Each Row" i was inspired to add a functionality to add rows.
    Lets say i have an Employee and Departments table. If i want to add three new employees in the employee editable table - that wont work - it seems that adding rows aint that simple, cause it seems not possible to commit more than one row at a time
    what i did according to forum posts and how-to´s:
    1. dropped "insert" from data control palette
    2. altered binding to from create to "CreateInsert"
    works ok, but if i press the button twice (3x, 4x) the new rows are shown, but if i commit them, only one is in the database?
    Any tips on that would be appreciated.

    I'm trying to a similar thing, create an input screen that allows you to add muliple rows at the same time some rows having a drop down list. I've read the following How to which lets me edit multiple rows but if I add a create button or a CreateInsert button it doesnt seem to give me rows to create.
    How To Create Multi Row Edit Forms in a JSP Page with Oracle JDeveloper 10g
    http://www.oracle.com/technology/products/jdev/tips/mills/JSP_Multi_Row_Edits.html

  • What happens when the row selection of a table is set as 'none'?

    I have a page, with a Search box, Departments and Employees tables. The user will enter a departmentId and click on Search button. Departments will be displayed. The departmentId column in Departments table is surrounded with a link. So when the user will click on the link, the desired employees will be displayed in the Employees table, if there is a view link between the VOs.
    Now suppose I have removed the view link. And the row selection of the Departments table is set as 'none'. So is it possible to get the desired employees of the chosen departmentId in this scenario, as because row selection has been disabled in the Departments table?
    I also dont want to use the Set Property Listener in this use case.

    Hi,
    If you have disabled rowselection and also are not implementing the selection listener? How will you find which row did the user select?
    Ramandeep

  • Insert row wherever within a table?

    Can it be done? Looking to add and delete rows wherever needed within a table. Currently, it only allows me to add or remove either the very first row or the very last; not those in-between. My users constantly request the ability to insert where needed (like word and excel) and I'm stumped on how to work it out.

    1. Cell options
    2. Cell options!
    You probably have too much space inside the top and bottom edges of each cell. Select the entire table and select Cell Options (from the Table menu or from your friendly right click pop-up menu). A relatively safe value for Top and Bottom distance is 1 mm.
    You can see the grid lines either because you have Show Frame Edges on (they should be thin and blue), or, more likely, because the ID import doesn't honor the Excel settings and puts the lines there by itself. If your lines are blue and thin, don't worry; they're just there to help you. Select Preview mode and they will disappear (just as text frame edges, guidelines, etc.). If the lines are black and thick, select the entire table and use the Cell options to switch them off. Just select either 0 pt thickness or a [None] line color.

  • Dump when Inserting records in Info type Tables through PA30

    Hi Experts,
    I am facing a issue in the transaction PA30 where in any changes made and saved leads to Runtime error (Inserting records in Infotype tables ).
    Error Line : insert (dbname) from  <prel_db>
    The Structure is the same but the data mismatch with the data types like
    Field NUMC(4) is filled with 00 instead of 0000
    Field DATE and TIME are Blank instead of 00000000 or 000000.
    Similarly facing the same issue in few other fields.
    The issue is same as the below thread and tried the solution given by Taher kanchwala by changing the data in the debugger and it worked.
    DBIF_RSQL_INVALID_REQUEST error while inserting records in infotype tables
    BUT i am not sure about the changes that needs to be done for fixing this issue permanently as it is mentioned to change at the configuration level.
    Any suggestions or solutions to this issue??
    Regards,
    AyyamPerumal

    Hi Nabheet,
    Thanks for your time. No enhancements are done.
    The issue is in the below statement where dbname is PA2001 and the field symbol <prel_db> has the structure of PA2001.
    insert (dbname) from  <prel_db>
    But the data is not matching with the data types like NUMC, DATE, TIME..
    Even the DOCSY and DOCNR which should been generated at this point is also not generated.
    On correcting this and giving dummy doc values, records are inserted.
    Attaching screen shots for your reference. Any solutions to this??
    Thanks and regards,
    Ayyamperumal

  • Data Services Designer - Problem when inserting rows in a database

    Hi everyone!!!
    I created a simple job that queries an Oracle database and writes the data returned from the query in a database as mysql.
    The problem is that only one row is being written in the database, being that the return of my query has more than one row.

    What product ad what version you are running and what environment you are in?
    Are you also getting some error?
    BAshir Awan

Maybe you are looking for

  • Error in running new report

    Dear SAPIENTS, A new report is created and getting error given below. The (internal) unit HR has not been maintained in the unit table     Message no. BM312 Diagnosis     No unit is maintained with the key HR. Procedure     Please maintain the approp

  • How to determine the size of recorded iPhone-video?

    After I record a video with my iPhone 4S, how can I tell what the size of that video file is?

  • Retreving the selected substring records from existing records.

    Hi all, SQL> select * from temp; C1 C2 1 abcdef 2 efbcda 3 axyz 4 abedcd I would like to retrieve only the records which have substring 'CD' from the available records.. Any help. Regards, ~ sri

  • Widgets from qooqee - how to ...

    Hi, as of this reading I don`t get any response from qooqee  for some help with their widgets. The latest question is about one week old and was about their "State Transition" and how it appears in the design mode inside Muse. Has anybody some sugges

  • IMovie file is to long

    Hi people Have a 3hr HD file of a Sony Handycam which i am editing in imovie i keep getting a error when i am exporting or saving it that the actual content is too long. So what i would like to ask is- if imovie can not handle 3hrs of video what shou