ORA-01458

Hello All,
I am using COPY command of SQL/Plus, I also have set my copycommit to 0. But I am getting the error message of ORA-01458. I'll appreciate any assistance. I also noticed that if records were copied less than 1000 those were copied but this table has over 1000 records.
Thank you.

When you set copycommit to 0, it doesn't commit until the end of the operation. If you set copycommit to 1000, it commits after 1000 batches. The size of each batch is determined by arraysize. Try setting the arraysize to a smaller number (valid values are 1 to 5000) and/or setting the copycommit to some number (between 1 and 5000). You might try, for example, arraysize 1 and copycommit 1000.

Similar Messages

  • ORA-01458 error while using Pro*C to invoke PL/SQL procedure, pls help

    I am using Pro*C (Oracle 10g on Itanium platform) to invoke PL/SQL procedure to read RAW data from database, but always encoutered ORA-01458 error message.
    Here is the snippet of Pro*C code:
    typedef struct dataSegment
         unsigned short     len;
         unsigned char     data[SIZE_DATA_SEG];
    } msg_data_seg;
    EXEC SQL TYPE msg_data_seg IS VARRAW(SIZE_DATA_SEG);
         EXEC SQL BEGIN DECLARE SECTION;
              unsigned short qID;
              int rMode;
              unsigned long rawMsgID;
              unsigned long msgID;
              unsigned short msgType;
              unsigned short msgPriority;
              char recvTime[SIZE_TIME_STRING];
              char schedTime[SIZE_TIME_STRING];
              msg_data_seg dataSeg;
              msg_data_seg dataSeg1;
              msg_data_seg dataSeg2;
              short     indSeg;
              short     indSeg1;
              short     indSeg2;
         EXEC SQL END DECLARE SECTION;
         qID = q_id;
         rMode = (int)mode;
         EXEC SQL EXECUTE
              BEGIN
                   SUMsg.read_msg (:qID, :rMode, :rawMsgID, :msgID, :msgType, :msgPriority, :recvTime,
                        :schedTime, :dataSeg:indSeg, :dataSeg1:indSeg1, :dataSeg2:indSeg2);
              END;
         END-EXEC;
         // Check PL/SQL execute result, different from SQL
         // Only 'sqlcode' and 'sqlerrm' are always set
         if (sqlca.sqlcode != 0)
              if (sqlca.sqlcode == ERR_QUEUE_EMPTY)          // Queue empty
                   throw q_eoq ();
              char msg[513];                                        // Other errors
              size_t msg_len;
              msg_len = sqlca.sqlerrm.sqlerrml;
              strncpy (msg, sqlca.sqlerrm.sqlerrmc, msg_len);
              msg[msg_len] = '\0';
              throw db_error (string(msg), sqlca.sqlcode);
    and here is the PL/SQL which is invoked:
    SUBTYPE VarChar14 IS VARCHAR2(14);
    PROCEDURE read_msg (
         qID          IN     sumsg_queue_def.q_id%TYPE,
         rMode          IN     INTEGER,
         raw_msgID     OUT     sumsg_msg_data.raw_msg_id%TYPE,
         msgID          OUT sumsg_msg_data.msg_id%TYPE,
         msgType          OUT sumsg_msg_data.type%TYPE,
         msgPrior     OUT sumsg_msg_data.priority%TYPE,
         msgRecv          OUT VarChar14,
         msgSched     OUT VarChar14,
         msgData          OUT sumsg_msg_data.msg_data%TYPE,
         msgData1     OUT sumsg_msg_data.msg_data1%TYPE,
         msgData2     OUT sumsg_msg_data.msg_data2%TYPE
    ) IS
    BEGIN
         IF rMode = 0 THEN
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY sched_time, raw_msg_id)
                   WHERE ROWNUM = 1;
         ELSIF rMode = 1 THEN
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY recv_time, raw_msg_id)
                   WHERE ROWNUM = 1;
         ELSE
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY priority, raw_msg_id)
                   WHERE ROWNUM = 1;
         END IF;
         UPDATE sumsg_msg_data SET status = 1 WHERE raw_msg_id = raw_msgID;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
              raise_application_error (-20102, 'Queue empty');
    END read_msg;
    where sumsg_msg_data.msg_data%TYPE, sumsg_msg_data.msg_data1%TYPE and sumsg_msg_data.msg_data2%TYPE are all defined as RAW(2000). When I test the PL/SQL code seperately, everything is ok, but if I use the Pro*C code to read, the ORA-01458 always happen, unless I change the SIZE_DATA_SEG value to 4000, then it passes, and the result read out also seems ok, either the bigger or smaller value will encounter ORA-01458.
    I think the problem should happen between the mapping from internal datatype to external VARRAW type, but cannot understand why 4000 bytes buffer will be ok, is it related to some NLS_LANG settings, anyone can help me to resolve this problme, thanks a lot!

    It seems that I found the way to avoid this error. Now each time before I read RAW(2000) data from database, i initialize the VARRAW.len first, set its value to SIZE_DATA_SEG, i.e., the outside buffer size, then the error disappear.
    Oracle seems to need this information to handle its data mapping, but why output variable also needs this initialization, cannot precompiler get this from the definition of VARRAW structure?
    Anyone have some suggestion?

  • ORA-01458: invalid length inside variable character string

    We encountered a serious problem in production system where we were getting this ORA error.
    The common search on google results into the following explaination.
    Cause: An attempt was made to bind or define a variable character string with a buffer length less than the minimum requirement.
    Action: Increase the buffer size or use a different type.
    However on analysis we found that the error was because, the value that was being bound to bind variable was NULL.
    This was a new finding for me.
    Please share your experiences/views on this.

    without any code and data examples this is impossible

  • Using Pro*C on Linux Oracle 8.1.6.0 on RH 6.2

    Whe have some problems using Pro*C:
    the program runs ok on all Oracle versions, including Oracle 8.1.6.0 on DEC OSF, but various sql errors are encountered on Linux Red Hat 6.2:
    1) "ORA-01458: invalid length inside variable character string" for this code:
    EXEC SQL BEGIN DECLARE SECTION;
    varchar I_LANGLB [4];
    short O_NOLBLB ;
    varchar O_LIBELB [26];
    EXEC SQL END DECLARE SECTION;
    EXEC SQL INCLUDE SQLCA.H;
    EXEC SQL WHENEVER SQLERROR GO TO MAJ_RESULT;
    EXEC SQL WHENEVER NOT FOUND CONTINUE;
    EXEC SQL DECLARE C0 CURSOR FOR
    SELECT LBL.NOLBLB, LBL.LIBELB
    FROM LBL
    WHERE LBL.EDITLB = 'MON' AND LBL.LANGLB = :I_LANGLB;
    strcpy (I_LANGLB.arr, "fra");
    I_LANGLB.len = 3;
    EXEC SQL OPEN C0;
    for ( ; ; )
    EXEC SQL WHENEVER NOT FOUND DO break;
    EXEC SQL FETCH C0 INTO :O_NOLBLB, :O_LIBELB;
    EXEC SQL CLOSE C0;
    2) with Dynamic Sql: "ORA-01007: variable not in select list"
    SELECT
    nvl(MODEME, ''),
    nvl(NBANME, 0),
    nvl(BASEME, '0'),
    nvl(PRORME,'0'),
    nvl(EVALME, '0'),
    nvl(DECOME, '0') ,
    nvl(CDDAME, '0'),
    nvl(CDMIME, '0'),
    nvl(TXMIME, 0),
    nvl(CDMAME, '0'),
    nvl(TXMAME, 0),
    nvl(CDTXME, '0'),
    nvl(CDSUME, '0'),
    nvl(TXSUME, 0),
    nvl(DUMIME, 0),
    nvl(MTVNME, 0),
    nvl(NOANML, 0),
    nvl(TAUXML, 0),
    DESIME
    FROM MET, LME
    WHERE MODEME = MODEML
    AND nvl(INLBME,'1')='1'
    ORDER BY MODEME,NOANML
    [ or
    ORDER BY 1,17 ]
    In both cases,
    We use the following precompiling options:
    include=/oracle/OraHome1/precomp/lib ireclen=132 oreclen=132 sqlcheck=syntax parse=partial select_error=no char_map=VARCHAR2 mode=ORACLE unsafe_null=yes
    dbms=V8
    Could someone help ?
    Thanks ...

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • Payment batch confirm program

    we moved apps tier to linux from hp-ux recently. Then onwards 'Confirm Payment Batch' is erroring out with below log message.
    APP-SQLAP-10916: apcnfm/3:ORA-01458: invalid length inside variable character string
    Any suggestions please. Thanks in advance.

    Hello.
    Have a look to MOS DOC ID 302734.1
    Octavio

  • Generic reporting on SQL variables using sqlgls() /Pro*C

    Generic reporting on host/SQL variables using sqlgls()
    I use sqlgls() in Pro*C 8.1.7 to get the last SQL statement that was parsed.
    It returns something like this.
    "select distinct QTY ,CHAPTER into :b0:b1,:b2:b3 from PT ,PU ,UIN U ,EU where (PART=:b4 and PU.PART=:b5) ....."
    I would like to see what the values are for each input variable e.g :b4 and :b5
    Is there any generic way of reporting what these values are rather than explicity writing code for each individual SQL statement?
    Is there a Pro*C method that gets the values of :b4 and :b5??
    We are recording the last SQL statement to a text file but cannot see what the values are that caused the SQL query to fail.
    Please contact me at [email protected]

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • Unable to view record history in an online form

    Hi, I am using fnd_standard.set_who statement when I commit my online form.I have the necessary columns created in my table, i used this statement to add them.
    add
    (created_by number(15),
    creation_date date,
    last_updated_by number(15),
    last_update_date date,
    last_update_login number(15));
    All the columns get populated with the right data but when I click on Help/Record History in the onlinen form I recieve the following error:
    APP-FND-01564: ORACLE error 1458 in fdxwho
    Cause: fdxwho failed due to ORA-01458: invalid length inside variable character string.
    Please help! This is very urgent!

    You may have better luck getting this question answered on an Applications forum, because you appear to be using code that is specific to Oracle Applications.

  • Limit the Oracle query run time using Pro*C

    All,
    I would like to limit my sql query for say a duration of only 10-15 secs. I do not want to kill the oracle process but send a signal to the C program with some message that " its taking more time"
    Is there an param which I can use it to limit, without killing or shutting down the oracle session or process.
    Thanks in advance

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • Linux oracle9i connectivity using Pro C/C++

    Hi,
    Can anyone plz help me out in connecting C++ with oracle9i under Linux(Red hat linux)??? A code snippet would be appreciated.. Thanks in advance..
    Ranjith

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • PLS-S-00201 error using Pro*C

    In my search looking for why sqlcst is Seg Faulting on me I used the SQLCHECK=FULL when running proc. I get 3 of the same errors on 3 different SQL statements.
    SQL:
    EXEC SQL SELECT value
    INTO :value
    FROM existing_table
    WHERE name = 'var';
    ERROR:
    Error at line 96, column 5 in file transactor.pc
    96 EXEC SQL SELECT value
    96 ....1
    96 PLS-S-00201, identifier 'EXISTING_TABLE' must be declared
    Error at line 96, column 5 in file transactor.pc
    96 EXEC SQL SELECT value
    96 ....1
    96 PLS-S-00000, SQL Statement ignored
    Error at line 96, column 5 in file transactor.pc
    96 EXEC SQL SELECT value
    96 ....1
    96 PCC-S-02346, PL/SQL found semantic errors
    The funny part is I have another SQL statement that is exactly the same, but looks for a different 'name'.
    Thanks,
    Dylan

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • Need help with AutoPatch error

    I got this error message when running an .ldt inside a custom product patch
    *Completed: file NFEE_EXEC_JAVA_VALIDATION_CCR.ldt on worker 1 for product xxnine username APPS.*
    *AutoPatch error:*
    *The following ORACLE error:*
    *ORA-01458: invalid length inside variable character string*
    *occurred while executing the SQL statement:*
    *Failed to insert a record into AD_TASK_TIMING*
    *Telling workers to quit...*
    I can't figure out what's happening.
    (EBS: R11.5)
    Thanks.
    Olavo Hansen.

    Your ldt file name (NFEE_EXEC_JAVA_VALIDATION_CCR.ldt) exceeds 30 characters - try with a shorter name.Please do NOT post the contents of MOS docs as this violates Oracle Support agreement policy -- Mentioning the Doc ID should be enough.
    Thanks,
    Hussein

  • Copy stmt

    hi,
    i used a sql copy stmt from sql editor for copying some rows of a table containing long as one of its colomn. but i get this error:
    ORA-01458: invalid length inside variable character string
    But i get this error only when i use the copy stmt second or further times. then i have to close this editor and open the sql editor again to have the copy stmt work.
    i am using oracle 8i ver 8.1.6.0.0 production standard edn. on windows 2000 pf. pl reply soon.

    hi,
    here's ur ans.
    What is the version of the database "icd"?
    i am using ORACLE 8I 8.1.6.0.0.
    is it what u mean? or where can i find it?.
    What is the structure of the table draft_messages?
    DRAFT_MESSAGES
    Name                Null          Type
    DRFT_MSG_MESSAGE_BLOCK_ID      NOT NULL      VARCHAR2(20)
    DRFT_MSG_MESSAGE_NAME      NOT NULL      VARCHAR2(50)
    DRFT_MSG_MESSAGE_STATUS           NOT NULL      VARCHAR2(15)
    DRFT_MSG_SOURCE_LRU_ID      NOT NULL      VARCHAR2(8)
    DRFT_MSG_DESTINATION_LRU_ID      NOT NULL     VARCHAR2(8)
    DRFT_MSG_MESSAGE_TYPE      NOT NULL      VARCHAR2(15)
    DRFT_MSG_FREQUENCY           NOT NULL      NUMBER(5,2)
    DRFT_MSG_USER_ID           NOT NULL      VARCHAR2(10)
    DRFT_MSG_LAST_UPD_DATE      NOT NULL      DATE
    DRFT_MSG_MESSAGE_ALIAS_NAME           VARCHAR2(50)
    DRFT_MSG_MESSAGE_DESCRIPTION           VARCHAR2(500)
    DRFT_MSG_TX_SUB_ADDRESS           VARCHAR2(4)
    DRFT_MSG_RX_SUB_ADDRESS           VARCHAR2(4)
    DRFT_MSG_FIRST_MINOR_CYCLE_NO           NUMBER(1)
    DRFT_MSG_ORG_SOURCE_LRU_ID           VARCHAR2(8)
    DRFT_MSG_FIN_DESTIN_LRU_ID           VARCHAR2(8)
    DRFT_MSG_REMARKS                VARCHAR2(240)
    DRFT_MESSAGE_MSG_MESSAGE_ID           VARCHAR2(5)
    DRFT_RT_RT_LRU_ID           NOT NULL      NUMBER(9)
    DRFT_MSG_ICD_ID           NOT NULL      NUMBER(9)
    DRFT_MSG_MUX_IDX_ID           NOT NULL      VARCHAR2(10)
    DRFT_MSG_NO_OF_WORDS           NOT NULL     NUMBER(2)
    DRFT_MSG_BUS_NO           NOT NULL      VARCHAR2(5)
    DRFT_MSG_MESSAGE_ID           NOT NULL      NUMBER(9)
    DRFT_MSG_NOTE                LONG
    DRFT_MSG_ALIAS_DESCRIPTION           VARCHAR2(500)

  • 1.-Se me perdió el CD de Lookout para Win 32 version 5.0 (build 7) (Adjunto

    1.-Se me perdió el CD de Lookout para Win 32 version 5.0 (build 7) (Adjunto
    archivo) y el manual del curso.
    ¿Cómo puedo conseguir ambas cosas:una copia nueva (Un CD) de esta versión
    de Lookout y el manual?.
    Alguna persona del foro puede enviarme una copia??

    >
    Error in: gllchd
    Function return status: 0
    Function Err Message: Executing hd_prep
    Function warning number: -1
    sqlcaid: sqlabc: 0 sqlcode: -1422 sqlerrml: 70
    sqlerrmc:
    ORA-01422: la recuperación exacta devuelve un número mayor de filas qu
    sqlerrp: sqlerrd: 0 0 0 12 0 538976288
    sqlwarn: sqltext:
    >
    Pl post details of OS, database and EBS versions. This may possibly be a bug - has an SR been opened. Two similar errors listed below are fixed via patches
    R12: When Uploading STAT Data get ORA-01458: Invalid Length Inside Variable Character String          (Doc ID 603053.1)
    Journal Import Fails With Error: Ora-1400 : Cannot Insert Null and SHRD0105          (Doc ID 300393.1)
    HTH
    Srini

  • Copy & Long ???

    Hi all,
    Oracle DB 8.1.7
    Table t1 is having a long column.
    Problem:1
    SQL> COPY FROM SCOTT/TIGER@gtest -
    TO system/manager@gtest -
    Insert t1 -
    USING SELECT * FROM scott.t1;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    ERROR:
    ORA-01458: invalid length inside variable character string
    After that i tried to change the sql*plus settings(long, arraysize & copycommit) and the following happened.
    Problem:2
    SQL> set long 1000000
    SQL> set copycommit 10
    SQL> set arraysize 1
    SQL>
    SQL> copy from scott/tiger@gtest -
    insert t1 -
    using select * from scott.t1;
    Array fetch/bind size is 1. (arraysize is 1)
    Will commit after every 10 array binds. (copycommit is 10)
    Maximum long size is 1000000. (long is 1000000)
    ERROR:
    ORA--1663296096: Message -1663296096 not found; product=RDBMS; facility=ORA
    can anybody help me on the above problems.
    Any help is appreciated.
    Thanks alot.

    Hi,
    Long datatype is deprecate use Clobs and Blobs.
    They are more flexible.
    Regards,
    Ganesh R

  • PL/SQL report errors: ORA-01422

    Hi all,
    (before i you read i would like to say i have searched the net for this error code but nothing shows up like this problem..)
    I am getting an error problem when i select certain Schemas from a list on an apex app. page, it only works for some schemas not all..
    When i select one schema, it is supposed to display one row.. when i select [ALL] it is supposed to show them all.
    It does work if i select '[ALL]' from the select list (p3_schema_name), just not for every single individual one.
    the error code:
    ORA-01422: exact fetch returns more than requested number of rows
    declare
      vSchema  varchar2(20);
      vStmt  varchar2(1000);
      vVersion number(5);
      vDBName  varchar2(20);
      vHostName varchar2(80);
      vStmt2  varchar2(1000);
      vVersion2 number(5);
      vDBName2  varchar2(20);
      vServer2 varchar2(80);
      vSchema2 varchar2(80);
      CURSOR c_schemas IS
        select owner from dba_tables@P3_DB_NAME.db_link where table_name = 'DDL_LOG' and num_rows > 0 order by owner;
    begin
      IF :P3_SCHEMA_NAME != '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
        vServer2 := :P3_SERVER_NAME;
        vSchema2 := :P3_SCHEMA_NAME;
          vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM';
          Execute Immediate vStmt2 into vDBName2, vVersion2;
            htp.p('<br>');
            htp.p('<table border="1">');
            htp.p('<tr>');
            htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
            htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
            htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
            htp.p('<th bgcolor="#FFCC99">PATCH</th>');
            htp.p('</tr>');
            htp.p('<tr>');
            htp.p('<td>');
            htp.p(vServer2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vDBName2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vSchema2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vVersion2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p('<BR>');
            htp.p('</td>');
            htp.p('</tr>');
            htp.p('</tr>');
            htp.p('</table>');
       ELSE IF :P3_SCHEMA_NAME = '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
       vHostName := :P3_SERVER_NAME;
       vDBName := :P3_DB_NAME;
         open c_schemas;
          htp.p('<br>');
          htp.p('<table border="1">');
          htp.p('<tr>');
          htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
          htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
          htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
          htp.p('<th bgcolor="#FFCC99">PATCH</th>');
          htp.p('</tr>');
        LOOP
          FETCH c_schemas INTO vSchema;
          EXIT WHEN c_schemas%NOTFOUND;
          vStmt  := 'select max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link where DDH_SCHEMA_NR = (select max(DDH_SCHEMA_NR) from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link) and rownum < 2' ;
          Execute Immediate vStmt into vVersion  ;
          htp.p('<tr>');
          htp.p('<td>');
          htp.p(vHostName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vDBName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vSchema);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vVersion);
          htp.p('</td>');
          htp.p('<td>');
          htp.p('<BR>');
          htp.p('</td>');
          htp.p('</tr>');
        END LOOP;
          htp.p('</tr>');
          htp.p('</table>');  
      CLOSE c_schemas;
    END IF;
    END IF;
    END;I have checked the DDH_SCHEMA_NR for repeating entries of the highest number.. some of the ones that dont work do have repeating entries some don't.
    Sorry if this is confusing, i have tried to explain it as best as i can.
    Thanks in advance for any help.
    Ashleigh

    Hello Ashleigh,
    Based on your code, I'd start by running this piece of SQL via command-line (thru SQL Workshop, SQL*Plus, Toad, etc.), replacing &P3_SCHEMA_NAME. and &P3_DB_NAME. with values that are currently causing the routine to fail and see if it returns more than one row. I don't know your data, but DISTINCT and GROUP BY are typically used to return multiple (though grouped/summarized) rows. It appears to be the only statement that would cause the error your seeing (more than one row being returned into single variables).
    select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM;I'm actually surprised that the code runs at all. I didn't think 'execute immediate' would know what to do with substitutions indicated as "&something." (I've typically seen that when substituting in dynamic HTML/Javascript code but maybe I'm learning something new). But since you already have vServer2 and vSchema2, I'd be more apt to code it as:
    vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from ' ||
    vSchema2 || '.ddl_log@' || vServer2 || '.db_link GROUP BY DDH_DB_NM';Hope this helps,
    John

Maybe you are looking for

  • I have a 2012 Mac Mini.  It keeps rebooting randomly.

    I have a Mac Mini, bought May 2012 connected to a Thunderbolt Display.  The screen will freeze, go black, go white , and then reboot.  When it reboots, the camera does not work.  If I reboot manually the camera will work. It does this randomly and re

  • Code works in old Joomla but not in plain HTML

    Having trouble with playing a SWF movie on our test site as we are moving to a different environment. On the main site, in a Joomla environment, this works < http://www.fumcmaumelle.org/component/option,com_wrapper/Itemid,43/> But the same codebase i

  • BPM Issue With Collection

    Hi All, I have designed a CollectTime dependand BPM Pattern (IDOC's_to_File) similar to Standard CollectPatternTimeDependant.The problem is when TimeOut = 2 Min Incoming are four IDOC's which are sent in >1min to XI,then  the BPM gets trigerred 4 tim

  • Changed IP, but Forum Mod banned me AGAIN, how?

    I posted here before about changing my IP. Basically, I had a disagreement with a mod on a forum. He banned me because of it. Since I was IP banned, I changed my IP address. (the one people can see). Sure enough, today, I see that I was banned (from

  • Storing Podcasts in a different location

    I want to store podcast on an external HDD connected to an Airport Extreme but keep my music files on the macbook to play over airtunes at a different location. I like to keep all my podcasts and have too many for the MBP HDD. can someone explain how