Migration of million rows from remote table using merge

I need to migrate (using merge) almost 15 million rows from a remote database table having unique index (DAY, Key) with the following data setup.
DAY1 -- Key1 -- NKey11
DAY1 -- Key2 -- NKey12
DAY2 -- Key1 -- NKey21
DAY2 -- Key2 -- NKey22
DAY3 -- Key1 -- NKey31
DAY3 -- Key2 -- NKey32
In my database, I have to merge all these 15 million rows into a table having unique index (Key); no DAY in destination table.
First, it would be executed for DAY1 and the merge command will insert following two rows. For DAY2, it would update two rows with the NKey2 (for each Key) values and so on.
Key1 -- NKey11
Key2 -- NKey12
I am looking for the best possible approach. Please note that I cannot make any change at remote database.
Right now, I am using the following one which is taking huge time for DAY2 and so on (mainly update).
MERGE INTO destination D
  USING (SELECT /*+ DRIVING_SITE(A) */ DAY, Key, NKey
               FROM source@dblink A WHERE DAY = v_day) S
  ON (D.Key = S.Key)
WHEN MATCHED THEN
   UPDATE SET D.NKey = S.NKey
WHEN NOT MATCHED THEN
   INSERT (D.Key, D.NKey) VALUES (S.Key, S.NKey)
LOG ERRORS INTO err$_destination REJECT LIMIT UNLIMITED;Edited by: 986517 on Feb 14, 2013 3:29 PM
Edited by: 986517 on Feb 14, 2013 3:33 PM

MERGE INTO destination D
  USING (SELECT /*+ DRIVING_SITE(A) */ DAY, Key, NKey
               FROM source@dblink A WHERE DAY = v_day) S
  ON (D.Key = S.Key)
WHEN MATCHED THEN
   UPDATE SET D.NKey = S.NKey
WHEN NOT MATCHED THEN
   INSERT (D.Key, D.NKey) VALUES (S.Key, S.NKey)
LOG ERRORS INTO err$_destination REJECT LIMIT UNLIMITED;The first remark I have to emphasize here is that the hint /*+ DRIVING_SITE(A) */ is silently ignored because in case of insert/update/delete/merge the driving site is always the site where the insert/update/delete is done.
http://jonathanlewis.wordpress.com/2008/12/05/distributed-dml/#more-809
Right now, I am using the following one which is taking huge time for DAY2 and so on (mainly update).The second remark is that you've realised that your MERGE is taking time but you didn't trace it to see where time is being spent. For that you can either use the 10046 trace event or at a first step get the execution plan followed by your MERGE statement.
LOG ERRORS INTO err$_destination REJECT LIMIT UNLIMITED;The third remark is related to the DML error logging : be aware that unique keys will empeach the DML error loggig to work correctly.
http://hourim.wordpress.com/?s=DML+error
And finally I advise you to look at the following blog article I wrote about enhancing an insert/select over db-link
http://hourim.wordpress.com/?s=insert+select
Mohamed Houri
www.hourim.wordpress.com

Similar Messages

  • Best practice for deleting multiple rows from a table , using creator

    Hi
    Thank you for reading my post.
    what is best practive for deleting multiple rows from a table using rowSet ?
    for example how i can execute something like
    delete from table1 where field1= ? and field2 =?
    Thank you

    Hi,
    Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
    Hope this helps.
    Thanks,
    RK.

  • Deleting a row from a table using jsp

    Given a table in a jsp, can an user click on a row of that table and retrieve the information so that the program can delete a record from a database table?
    most of the tables that I have seen are static, the user cannot interact with them(specially when the user wants to delete several records from a database table).
    Can anyone suggests a good book or way of deleting a row from table using jsp.

    eg use a column in the table that has a radio button or check box,
    on submit, get all the rows that are checked, using the row as an index into your db store, get the key and use the key to issue the sql delete command.

  • Count rows from multiple tables using SQL only

    Hi, I know this has probably been answered before, but I couldn't find the answer anywhere. Please help.
    I'd like count(*) [rows] for all tables in database using SQL only - no PL/SQL
    The result should be something like:
    Table RowCount
    DBA_TABLES 1000
    DBA_USERS 50
    etc.
    Thanks!

    offcource write this script:
    create or replace procedure count_tables (ip_schema VARCHAR2)
    is
    lv_owner VARCHAR2(100);
    lv_table_name VARCHAR2(100);
    lv_sql_statement VARCHAR2(2000);
    lv_count_table NUMBER;
    CURSOR c1 IS
    SELECT owner, table_name
    FROM all_tables
    WHERE owner = ip_schema
    ORDER BY table_name;
    begin
    dbms_output.put_line ('+--------------------------------------------------------------------+');
    dbms_output.put_line ('¦ | | ¦');
    dbms_output.put_line ('¦ Schema Name | Table Name | Number of Rows ¦');
    dbms_output.put_line ('¦ | | ¦');
    dbms_output.put_line ('¦------------------------------------------------------------------¦');
    OPEN c1;
    LOOP
    FETCH c1 INTO lv_owner , lv_table_name;
    EXIT WHEN c1%NOTFOUND;
    lv_sql_statement := 'SELECT count(*) FROM ' || lv_owner || '.' || lv_table_name;
    EXECUTE IMMEDIATE lv_sql_statement INTO lv_count_table;
    IF lv_count_table > 0 THEN
    dbms_output.put_line ('| '||rpad(lv_owner, 14, ' ')||'| '|| rpad(lv_table_name, 32, ' ')||'| '|| rpad(lv_count_table, 16, ' ')||' |');
    -- dbms_output.put_line ('|---------------|---------------------------------|------------------|');
    END IF;
    END LOOP;
    CLOSE c1;
    dbms_output.put_line ('+--------------------------------------------------------------------+');
    exception
    WHEN OTHERS THEN
    dbms_output.put_line ('owner: '||lv_owner||' - table: '||lv_table_name||' - '||sqlerrm);
    end count_tables;
    set serveroutput on size 1000000
    exec count_tables
    drop procedure count_tables;

  • Delete row from internal table using field symbol.

    Hi friends,
      I created dynamic internal table using field symbol. I want to delete some data using where clause.
    for example. i want to use like,
        DELETE <FS> WHERE KUNNR = WA_KNA1-KUNNR.
    Like the above statment it won't work. How i can use delete with where clause in field symbols.
    Hope any one can help me.
    Thanks and regards
    Srikanth. S

    hi Srikanth,
    I think you have to LOOP through the whole internal table and check each line and decide to delete or not:
    LOOP at <itab> INTO <wa>.
    ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <wa> TO <field>.
    CHECK <field> IS ASSIGNED.
    IF <field> EQ WA_KNA1-KUNNR.
    DELETE ...
    ENDIF.
    UNASSIGN <field>.
    ENDLOOP.
    hope this helps
    ec

  • Deleting a row from a table using javascript.......

    Hi,
    i am writting an application in which, i need the following:
    1. calling a javascript on a click of a button named "Delete"
    2. and javascript should delete that particular record under which the delete
    button is placed which means... i am placing a delete button and a checkbox
    under every record i display on my browser. When the check box is checked ,
    and when the user clicks Delete button, it should delete that particular record.
    Any one can help me in this please.....
    Thanks in Advance....
    Bala

    <p>The short answer: You can't. At least not the way you're asking to.</p>
    <p>
    JavaScript does not (to my knowledge at least, someone please correct me if I'm wrong) have any way of connecting to an Oracle database to query for content, though it is possible with DHTML to substitute content into the page.
    </p><p>
    To do what you want, you're going to have to look into server-side scripting languages. Among the more notable examples are PHP, Perl, JSP, and ASP. I would recommend PHP, especially with the PHP right here at Oracle.com.
    </p><p>
    Anyways, what you're probably going to want to do is have a unique identifier for each row which you would be passing to the server and mark each delete button with that identifier. If you want the operation to be extremely transparent, you would use a HTTP-POST-style form parameter passing as opposed to HTTP-GET (which would expose all arguments on the command line, plus or minus any encryption you attempt to discourage script kiddies from probing the quality of your code).
    </p><p>
    But the important point here: There is no way to not send a request to the web server and still do what you want to do.
    </p><p>
    Hope that helps.
    </p><p>
    Cheers.
    </p>

  • Select multiple rows from dual table

    Is it possible to select multiple rows from dual table using a single select statement.
    i.e., i want the out put to be
    column_name
    1
    2
    3
    4
    Edited by: vidya.ramachandra on Dec 14, 2009 8:24 AM

    Aside from the fact you're responding to an old thread...
    1002424 wrote:
    While using CONNECT BY, I see it always leave behind one row.
    Suppose I have a condition based on which I have to generate constant rows like
    SELECT 1 FROM DUAL WHERE ROWNUM < N;
    Here if N = 0, still it gives out single row.... you are obviously doing something wrong in your code elsewhere, because that SQL statement does not always return a single row...
    SQL> SELECT 1 FROM DUAL WHERE ROWNUM < 0;
    no rows selected
    SQL>

  • PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables

    Dear ALL,
    My O/S is Redhatlinux 5.2 and i had Migrated my Oracle databse to 11g2. But after that while i am retrieving records through dblinks from one of my other Oracle 9.2.0.8 databse it's throwing the error : PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables.* This error i am getting in TOAD as well as SQL Developer.
    Can anybody tell me how to fix this error ? Because am not able to get the records.
    Also am getting another error during retrieving data from some of my tables after migrating i.e the table which having CLOB data type while am accessing to retrieve the records using select query it's throwing the error :
    +(The following error has occurred:+
    A query with LOB's requires OCI8 mode, but OCI7 mode is used.)
    If anyone having any idea kindly share.
    Thanks and Regards
    Biswa

    Hi,
    Ya what u sent that is fine. But already am using one procudure which is accessing LOB data from another databse through DBlink and working fine. But there Both the databse are 9.2.0.8.
    But while am executing the same procedure in oracle 11g where the Dblink accessing the data from Oracle 9i , there am getting this error.
    Kindly tell if u know any resolution.
    Thanks

  • Display distinct rows from Oracle table without using "DISTINCT" keyword.

    How to retrieve distinct rows from oracle table without using 'DISTINCT' keyword in SQL?
    Thanks in advance.
    Mihir

    Welcome to the forum.
    Besides GROUP BY you can use UNIQUE instead of DISTINCT as well, but that's probably not wanted here ;) , and the ROW_NUMBER() analytic:
    SQL> create table t as
      2  select 1 col1 from dual union all
      3  select 1 from dual union all
      4  select 2 from dual union all
      5  select 3 from dual union all
      6  select 4 from dual union all
      7  select 4 from dual;
    Table created
    SQL> select col1 from t;
          COL1
             1
             1
             2
             3
             4
             4
    6 rows selected
    SQL> select distinct col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select unique col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select col1 from t group by col1;
          COL1
             1
             2
             3
             4
    SQL> select col1
      2  from ( select col1
      3         ,      row_number() over (partition by col1 order by col1) rn
      4         from   t
      5       )
      6  where rn=1;
          COL1
             1
             2
             3
             4

  • Deleting rows from a table

    COuld anyone tell me how to delete rows from a table which has millions of rows.
    TIA,
    Oracle user

    if you are deleting all the rows, use "truncate table" in sql*plus.
    or if you are deleting all but a handful of rows, then copy the rows you still want to a spare table, drop the original table, and rename the spare table back to the original table's name.
    hope this helps

  • How to Load 100 Million Rows in Partioned Table

    Dear all,
    I a workling in VLDB application.
    I have a Table with 5 columns
    For ex- A,B,C,D,DATE_TIME
    I CREATED THE RANGE (DAILY) PARTIONED TABLE ON COLUMN (DATE_TIME).
    AS WELL CREATED NUMBER OF INDEX FOR EX,
    INDEX ON A
    COMPOSITE INDEX ON DATE_TIME,B,C
    REQUIREMENT
    NEED TO LOAD APPROX 100 MILLION RECORDS IN THIS TABLE EVERYDAY ( IT WILL LOAD VIA SQL LOADER OR FROM TEMP TABLE (INSERT INTO ORIG SELECT * FROM TEMP)...
    QUESTION
    TABLE IS INDEXED SO I AM NOT ABLE TO USE SQLLDR FEATURE DIRECT=TRUE.
    SO LET ME KNOW WHAT THE BEST AVILABLE WAY TO LOAD THE DATA IN THIS TABLE ????
    Note--> PLEASE REMEMBER I CAN'T DROP AND CREATE INDEX DAILY DUE TO HUGE DATA QUANTITY.

    Actually a simpler issue then what you seem to think it is.
    Q. What is the most expensive and slow operation on a database server?
    A. I/O. The more I/O, the more latency there is, the longer the wait times are, the bigger the response times are, etc.
    So how do you deal with VLT's? By minimizing I/O. For example, using direct loads/inserts (see SQL APPEND hint) means less I/O as we are only using empty data blocks. Doing one pass through the data (e.g. apply transformations as part of the INSERT and not afterwards via UPDATEs) means less I/O. Applying proper filter criteria. Etc.
    Okay, what do you do when you cannot minimize I/O anymore? In that case, you need to look at processing that I/O volume in parallel. Instead of serially reading and writing a 100 million rows, you (for example) use 10 processes that each reads and writes 10 million rows. I/O bandwidth is there to be used. It is extremely unlikely that a single process can fully utilised the available I/O bandwidth. So use more processes, each processing a chunk of data, to use more of that available I/O bandwidth.
    Lastly, think DDL before DML when dealing with VLT's. For example, a CTAS to create a new data set and then doing a partition exchange to make that new data set part of the destination table, is a lot faster than deleting that partition's data directly, and then running a INSERT to refresh that partition's data.
    That in a nutshell is about it - think I/O and think of ways to use it as effectively as possible. With VLT's and VLDB's one cannot afford to waste I/O.

  • Deleting Rows From A Table After Running a Report

    I've created a report that inserts rows into a table on the asp page then calls a BI Publisher report to display the data. After running the report in BI Publisher I need to delete the rows from the table that had just been inserted. How is the best way to go about this in BI Publisher?

    The best way I know of would be to use an "afterReport trigger".
    An afterReport trigger fires after the XML output has been generated.
    Thanks,
    Bipuser

  • Getting error while deleting rows from the database using the View Object

    Hi All,
    I am using jdev 11.1.1.4.0. I am removing the rows from the database using viewobject( quering the viewobject to find the records i want to delete).
    I am using vo.removeCurrentRow(0). Before this statement I am able to get the rows I want to delete.
    after that i am doing am.transaction.commit(). But I am getting the error..
    javax.faces.el.EvaluationException: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for CriteriaEO
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for CriteriaEO
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1117)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:553)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8134)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5863)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6369)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6551)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3275)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3078)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2088)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2369)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         ... 53 more
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00972: identifier is too long
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:869)
    Please give suggestions...
    Thanks
    Kanika

    Hi,
    First Run Application module and confirm whether model project is OK,Cause for the Error is Caused by: java.sql.SQLSyntaxErrorException: ORA-00972: identifier is too long
    check:
    Issues with table/column name length
    identifier is too long
    I guess following error occurred because above issue
    JBO-26080: DMLException
    Cause: An unexpected exception occurred while executing the SQL to fetch data for an entity instance or lock it.
    Action: Fix the cause for the SQLException in the details of this exception.
    See:
    http://download.oracle.com/docs/cd/A97337_01/ias102_otn/buslog.102/bc4j/jboerrormessages.html#26080Hope you will helpful

  • FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.

    Hi,
    I have one multi record block in which i want to fetch values
    (more then one record) from another table using select statement
    IN KEY NEXT ITEM.I am getting following error.
    ORA-01422: exact fetch returns more than requested number of rows
    Thanks in advance.

    In your case I see no reason to use non-database block and to try to populate it from a trigger with a query, instead of using the default forms functionality where you can associate the block and the fields with table, create where clause using bind variables and simply use execute_query() build-in to populate the block. The power of the forms is to use their build-in functionality to interact with the database.
    Also, you can base your block on a query, not on a table and you dynamically change this query using set_block_property() build-in. You can use any dynamic queries (based on different data sources) and you simply need to control the column's data type, the number of the columns and their aliases. Something like creating inline views as a block data source.
    However, you can replace the explicit cursor with implicit one like
    go_block('non_db_block_name');
    first_record();
    FOR v_tab IN (SELECT *
    FROM tab
    WHERE col_name = :variable)
    LOOP
    :non_db_block_name.field1 := v_tab.col1;
    :non_db_block_name.field2 := v_tab.col2;
    next_record();
    END LOOP;

  • Unload 10,000,000 of rows from a table.

    Hi Group,
    Is there any optimized, quick way to unload 10 million of rows from a table to a text file on the server, each field has to be separated with "|" symbol.
    Thanks a lot
    Oracle version 10.2.0.4
    Platform: Linux RH 64 bits

    sb92075 wrote:
    SET COLSEP='|'
    spool unload.csv
    SELECT ........
    spool offExactly -- no fancy tools are needed for this, just SQL*Plus. You might need a few more SET commands to make sure that the file is clean, with no extraneous headers, footers, trailing white space etc.. Just experiemnt with a set of something like 200 rows of the table.

Maybe you are looking for

  • How do I stop receiving iMessages across all devices?

    I have multiple apple devices setup to receive iMessages, but I have changed my main phone from iPhone to another phone and would like to stop receiving iMessages from my contacts. How do I disable iMessages from being sent by all of my contacts?

  • Help with boot problems

    I was trying to install XP last night on my imac with boot camp and ran into this problem. The partition I would create in Boot Camp would never show when rebooting with the XP cd so I thought, Maybe its on the next screen of XP install. I SELECTED t

  • Problemin read staement

    hi guriji, i have writeen one query . loop at itab. read table itab2  with key kostl = itab-fictr                         hkont = itab-acc_code . kostl1 = itab2-kostl+6(4). hkont1 = itab2-hkont+4(6). if kostl1 = itab-fictr and hkont1 = itab-acc_code.

  • Logon exit for jco rfc call

    Hi. There is a external system to access our SAP rfc function by jco. I want to limit the jco access must be come from a certain ip. I found user exit SUSR0001 and can limit GUI logon. But it is no effect on jco logons. Is there another user exit for

  • I want to make a 3d Jelly animation in Flash, can i?

    Hi there, I know that Flash 3D is limited and maybe we need to wait till we can have a MAYA/3DS MAX like Output in Flash. But I want to make some thing sure. I need to make a 3D Jelly like ball, it flies to a wall and splatters on the wall creating a