Error when inserting into a table

Hi,
I am running this insert stmt
SQL> insert into cntct select * from CUSTSRV_ADMN.cntct_bk1;
ERROR at line 1:
ORA-01733: virtual column not allowed here
Below is the table structure.
SQL> desc cntct;
Name Null? Type
CNTCT_KEY NOT NULL NUMBER(10)
CNTCT_NUM NOT NULL CHAR(12)
SRC_SYS_DESC NOT NULL VARCHAR2(5)
ACTVTY_DT NOT NULL DATE
CNTCT_TYPE_DESC NOT NULL VARCHAR2(15)
CNTCT_INIATR_CD NOT NULL CHAR(1)
CNTCT_INIATR_DESC NOT NULL VARCHAR2(10)
CNTCT_INIATR_NAME NOT NULL VARCHAR2(30)
CNTCT_INIATR_PHONE_NUM VARCHAR2
CNTCT_STUS_CD NOT NULL CHAR(1)
CNTCT_STUS_DESC NOT NULL VARCHAR2(10)
CNTCT_AGE_DAYS_CNT NOT NULL NUMBER(4)
CNTCT_ELPSD_TIME_SEC_CNT NOT NULL NUMBER(10)
CNTCT_RCVD_DT NOT NULL DATE
CNTCT_OPEN_DT NOT NULL DATE
CNTCT_RSLTN_DT NOT NULL DATE
CNTCT_NEW_IND NOT NULL CHAR(1)
HIGHST_NMIS_CD NOT NULL NUMBER(1)
INIATNG_AGENT_KEY NOT NULL NUMBER(5)
CLSNG_AGENT_KEY NOT NULL NUMBER(5)
CNTCT_ID NOT NULL VARCHAR2(20)
IMG_NUM NOT NULL VARCHAR2(13)
PRVDR_NPI NOT NULL VARCHAR2(10)
PRVDR_TIN NOT NULL VARCHAR2(9)
CNTCT_OPEN_DTIME NOT NULL DATE
CNTCT_RSLTN_DTIME NOT NULL DATE
Please advise.
Regards,
Narayan

No its another table.
I also tried using columns instead of '*'
SQL> insert into cntct
2 select CNTCT_KEY,
3 CNTCT_NUM,
4 SRC_SYS_DESC,
5 ACTVTY_DT,
6 CNTCT_TYPE_DESC,
7 CNTCT_INIATR_CD,
8 CNTCT_INIATR_DESC,
9 CNTCT_INIATR_NAME,
10 CNTCT_INIATR_PHONE_NUM,
11 CNTCT_STUS_CD,
12 CNTCT_STUS_DESC,
13 CNTCT_AGE_DAYS_CNT,
14 CNTCT_ELPSD_TIME_SEC_CNT,
15 CNTCT_RCVD_DT,
16 CNTCT_OPEN_DT,
17 CNTCT_RSLTN_DT,
18 CNTCT_NEW_IND,
19 HIGHST_NMIS_CD,
20 INIATNG_AGENT_KEY,
21 CLSNG_AGENT_KEY,
22 CNTCT_ID,
23 IMG_NUM,
24 PRVDR_NPI,
25 PRVDR_TIN,
26 CNTCT_OPEN_DTIME,
27 CNTCT_RSLTN_DTIME
28 from CUSTSRV_ADMN.cntct_bk1;
Still have the same error.
insert into cntct
ERROR at line 1:
ORA-01733: virtual column not allowed here
Please advise.
Regards,
Narayan

Similar Messages

  • " Error when inserting in PSA table RSTSODSPART" when loading into PSA

    Hello,
    Did anyone encounter something similar, and found a solution ?
    BI 7.0 -  EnhP 1 - SP5
    When loading data from R/3 into PSA, we encounter following error message:
    " Error when inserting in PSA table RSTSODSPART"
    ===============================================================
    - the first datapackage is written successfully to PSA,
    but from the second datapackage onwards the error message pops-up
    " Error when inserting in PSA table RSTSODSPART"
    - The original dataselection in the infopackage is somewhere stored
    If the selection in the InfoPackage is reduced (e.g. only one document i.o. a period)
    it stil starts loading according the original selection (the month)
    - If we create a new InfoPackage and select very few data (only one datapackage)
    then we can load to PSA succesfully, but when we load to DSO we can't activate the DSO.
    - We remarked that:
    Two versions of the PSA exist for that datasource 0FI_GL_40:
    a Table(/BIC/B0000555000) in version 1 exists,
    a Table(/BIC/B0000555001) in version 2 exists
    Thanks in advance,
    Best regards

    Hello All,
    We had a problem similar to what Ilse Depoortere describes. The problem happens in our BW QA system a few days/weeks after it has been copied from Production. Data loads start failing with these two error messages:
    RSM2 851 - Error when writing in PSA (Caller 32)
    RSAR 130 - Error 7 when adding to PSA (Caller 70)
    We have just implemented the fix described in note 1340371 (replaced the LIB_DBSL with patch level 247), and the problem is gone. Failed data load process chains can be restarted and finish successfully.
    This has been a really useful discussion, thanks all! And thanks to my coworker Bob who found it.
    Vince Vajda

  • JDBC Receiver adapter Error for insert into DB2 table

    Hi all,
    I want to insert data into a DB2 table on AS400 via a Receiver JDBC adapter.
    The communication channel seems to be ok but when I try to send the message, I obtain the following message on the adapter monitoring :
    Error: TransformException error in xml processor class, rollback:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'GIK.GDT01' (structure 'Statement'): java.sql.SQLException: La table GDT01 de la bibliothèque GIK est incorrecte pour cette opération.
    Could someone help me?
    In the communication channel I have seen we can choose "native SQL String" as message protocol.
    Do you think it could be a workaround for me? if yes, could someone send me an example about it?
    thanks a lot,
    Philippe

    Hi,
    Try to remove GIK.GDT01 in table tag of your XML structure and put GDT01 alone and see.
    The solution to your problem is found on this particular link.
    http://www.websina.com/bugzero/faq/exception-as400.html
    Tell me if it works
    Best regards,
    Felix

  • Weird problem w. mysql 4.0 when inserting  into a table with auto_incremet

    Since I upgraded my mysql database from 3.23 to 4.0.1
    the following code does not work anymore:
    I get this error msg:
    <b>"Invalid argument value: Duplicate entry '2147483647' for key 1"</b>
    <code>
    package mysql4test;
    import java.sql.*;
    class test {
    public test() {
    public static void main(String[] args) {
    Connection connection = null;
    Statement st = null;
    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    connection = DriverManager.getConnection
    ("jdbc:mysql://192.168.0.4/x?user=x&password=");
    st = connection.createStatement();
    for (int i=1;i<10;i++)
    String insert = "insert into x (b) values('hello');";
    System.out.println(insert);
    st.executeUpdate(insert);
    } catch (Exception ex) { System.err.println(ex.getMessage());}
    </code>
    The table definition of table x is the following:
    create table x(a int(11) primary key auto_increment, b varchar(10));
    What makes the thing even more mysterious is, that doing the same thing as this programm does manually on an mysql client does not produces any error message.
    insert into x (b) values('hello'); works fine on the mysql client deliverd with the server.

    Hi eggsurplus!
    Yes, I succeeded in different ways to solve the problem. changing the table was one of it. but the problem is that i can't simply change all tables (there are a lot) as the are used in other programms.
    The simplest solution that i figured out so far was changing the insert from
    insert into x (b) values('hello')
    to
    insert into x (a,b) values("+i+",'hello')"
    But this solution is still not satisfactory as in more complex programs you can't just use the i variable of the for loop, but you have to add a new variable that increments on every insert.
    This still means changing a lot of code that i wrote for mysql 3.x.
    Besides, i tried also another jdbc driver and it still didn't work.
    The same bug was reported in a PHP forum, but without solution

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Error when inserting into table - Undefined Variable

    DB = Oracle 10.2.0.1
    WEBSERV = Apache 2.0.55
    LANG = PHP5
    I have created (or more accurately, copied) a php script to insert data into one of my database tables when I press submit. The code is as follows (my connect string works fine and its included in the dbutils.php file):
    <?php
    if($submit == "submit"){
    include "dbutils.php";
      $query = "insert into users values (seq_user_usr_id.NEXTVAL, '$usr_name')";
      $cursor = OCIParse ($db_conn, $query);
      if ($cursor == false){
        echo OCIError($cursor)."<BR>";
        exit;
      $result = OCIExecute ($cursor);
      if ($result == false){
        echo OCIError($cursor)."<BR>";
        exit;
      OCICommit ($db_conn);
      OCILogoff ($db_conn);
    else{
       echo '
        <html><body>
        <form method="post" action="index.php">
    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>Please enter a username:</td>
        <td><input type="text" name="usr_name"></input><br></td>
    </tr>
    <tr>
        <td><input type="submit" name="button" value="Submit"></input></td>
    </tr>
    </table>
        </form>
        </body></html>
    ?></p>I am getting the following error regarding an undefined variable:
    [Fri Jan 20 13:11:22 2006] [error] [client 127.0.0.1] PHP Notice: Undefined variable: submit in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\mywebsite\\test.php on line 3
    Where would I declare this variable? It is just a check to see if the submit button is pressed as far as I can see. Any help would be greatfully appreciated.
    W8

    I have changed the code to this:
    <?php
    if($submit == "submit"){
    include "dbutils.php";
    $usr_name = $_POST['usr_name'];
    $query = "insert into users (column1, column2) values (seq_user_usr_id.NEXTVAL, '$usr_name')";
    $cursor = OCIParse ($db_conn, $query);
    if ($cursor == false){
    echo OCIError($cursor)."
    exit;
    $result = OCIExecute ($cursor);
    if ($result == false){
    echo OCIError($cursor)."
    exit;
    OCICommit ($db_conn);
    OCILogoff ($db_conn);
    else{
    $submit = $_POST['submit'];
    echo '
    <html><body>
    <form method="post" action="index.php">
    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>Please enter a username:</td>
    <td><input type="text" name="usr_name"></input>
    </td>
    </tr>
    <tr>
    <td><input type="submit" name="submit" value="submit"></input></td>
    </tr>
    </table>
    </form>
    </body></html>
    ?>And now I am getting the following error:
    [Mon Jan 23 13:45:32 2006] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  submit in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\mywebsite\\test2.php on line 24Does anyone have any ideas?
    I am struggling to find an example to work from to get this working. If anyone can point me to any literature that will explain the code so that I can work this out for myself that would also be a great help.

  • ORA-06502: error when inserting into table via db link with long datatype

    Folks,
    I am getting the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    This occurs when an insert is done via a database link into a table that has a LONG data type for one of the columns, and the string contains some carriage returns and or line feeds.
    I have checked by removing the db link, and inserting into a local table with identical column data types, where there is no error.
    So this might be another db link bug?
    So I need to remove the carriage returns and/or line feeds
    in my pl/sql block in the page process. I have tried
    l_text := REPLACE(l_text, CHR(10), ' ');
    l_text := REPLACE(l_text, CHR(13), NULL);
    but still getting the ORA-06502. Would really appreciate some advice here, please.
    Cheers
    KIM

    Scott,
    Time to 'fess up':
    My fault sorry, the error was coming from another page process where I had allowed insufficient string length for one of the variables, and my error message did not identify the page process clearly.
    This leads me to make a request for future releases, could the system error messages state which page process caused the problem?
    One other thing I notice, and this might be a feature not a fault, the page processes are numbered: "Page Process:      3 of 5". However process 3 is not the 3rd one to be processed, and probably refers to the order in which they are created. Should the number reflect the process order?
    Cheers
    KIM

  • Inconsistent datatypes error when inserting into a object

    I am trying to insert some test data into the table emp.I have managed to succesfully create the objects and types but when I try to insert into the emp table I get a inconsistent datatypes error however I have checked the datatypes and they all seem fine. Can anyone help me.
    thanks
    CREATE OR REPLACE TYPE Address_T AS object
    (ADDR1                VC2_40,
    ADDR2               VC2_40,
    CITY_TX          VC2_40,
    COUNTY_CD          VC2_40,
    POST_CD          VC2_40);
    CREATE OR REPLACE TYPE PERSON_T AS OBJECT (
    LNAME_TX           NAME_T,
    FNAME_TX           NAME_T,
    BIRTH_DATE          DATE,
    TELEPHONE          VC2_20,
    EMAIL               VC2_40);
    CREATE OR REPLACE TYPE EMP_T AS OBJECT (
    EMP_ID     NUMBER (10),
    PERSON     PERSON_T,
    ADDRESS ADDRESS_T,
    HIRE_DATE DATE)
    CREATE TABLE EMP OF EMP_T
    (EMP_ID NOT NULL PRIMARY KEY);
    INSERT INTO EMP VALUES (1,           
    PERSON_T('PETCH',
    'GAVIN',
    '23-JAN-80',
    '(01964)550700',
    '[email protected]'),
    ADDRESS_T('67 CANADA',
    'WALKINGTON',
    'BEVERLEY',
    'EAST YORKSHIRE',
    'HU17 7RL'),
    '11-FEB-02'
    ERROR at line 1:
    ORA-00932: inconsistent datatypes

    Gavin,
    What is your VC2_40 and NAME_T type definition? Your insert used these as varchar2, which is a built-in type not a user-defined type. If you explicitly define these to be varchar2's, the insert statement works fine.
    Regards,
    Geoff
    I am trying to insert some test data into the table emp.I have managed to succesfully create the objects and types but when I try to insert into the emp table I get a inconsistent datatypes error however I have checked the datatypes and they all seem fine. Can anyone help me.
    thanks
    CREATE OR REPLACE TYPE Address_T AS object
    (ADDR1                VC2_40,
    ADDR2               VC2_40,
    CITY_TX          VC2_40,
    COUNTY_CD          VC2_40,
    POST_CD          VC2_40);
    CREATE OR REPLACE TYPE PERSON_T AS OBJECT (
    LNAME_TX           NAME_T,
    FNAME_TX           NAME_T,
    BIRTH_DATE          DATE,
    TELEPHONE          VC2_20,
    EMAIL               VC2_40);
    CREATE OR REPLACE TYPE EMP_T AS OBJECT (
    EMP_ID     NUMBER (10),
    PERSON     PERSON_T,
    ADDRESS ADDRESS_T,
    HIRE_DATE DATE)
    CREATE TABLE EMP OF EMP_T
    (EMP_ID NOT NULL PRIMARY KEY);
    INSERT INTO EMP VALUES (1,           
    PERSON_T('PETCH',
    'GAVIN',
    '23-JAN-80',
    '(01964)550700',
    '[email protected]'),
    ADDRESS_T('67 CANADA',
    'WALKINGTON',
    'BEVERLEY',
    'EAST YORKSHIRE',
    'HU17 7RL'),
    '11-FEB-02'
    ERROR at line 1:
    ORA-00932: inconsistent datatypes

  • Timeout expired error when inserting into a mirrored server

    We have 3 SQL Server 2012 servers.
    All 3 SQL Server has the same database, ie myDB.
    In 2 of the servers (say server A and B), myDB is mirrored, and on the 3rd server myDb is NOT mirrored.
    When the program calls a stored procedure to insert a record into a table in the database, on the mirrored servers (server A and B) sometimes it takes up to 7 seconds and gave an error "Timeout expired.  The timeout period elapsed prior
    to completion of the operation or the server is not responding.  This failure occured while attempting to connect to the Principle server." This doesn't happen all the time, but happens often enough throughout the day.
    The 3rd server (that is NOT mirrored) never gives this Timout expired error.
    Will mirrored server cause slowness in writing, thus causes the Timeout expired error ?
    Thank you.

    Since we can live with some missing data, I think we should use asynchronous mirroring instead of synchronous, do you agree ?
    That may be an options, provided that you are on Enterprise Edition. As I recall, Standard Edition only has synchronhous mirroring.
    There are caveats with asynchronous mirroring. One is data loss in case of a failover, which you say that you can live with. There may be more caveats, though. Unfortunately, since my role is more of a developer than a DBA, I'm not too well versed in
    the details. Maybe someone else can fill in?
    Can a firewall issue cause mirror latency, that in turn causes the delay in writing to the principal database ?
    Firewalls and other network hiccups certainly can cause a latency.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Error when inserting in a table with an identity column

    Hi,
    I am new to Oracle SOA suite and ESB.
    I have been through the Oracle training and have worked for about 2 months with the tooling.
    We have a Database adabter that inserts data in 5 Tables with relations to each other.
    Each table has his own not NULL Identity column.
    When running/ testing the ESB service we get the error at the end of this post.
    From this we learned that the Database adapter inserts the value NULL in the identity column.
    We cannot find in the documentation how to get the database adabter to skip this first column and ignore it.
    Is this possible within the wizard? Our impression is no
    Is this possible somwhere else/
    And if so How can we do this?
    If anyone can help it would be greatly appreciated
    Pepijn
    Generic error.
    oracle.tip.esb.server.common.exceptions.BusinessEventRejectionException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/GVB_PDI_PDI_Wegschrijven_Medewerkergegevens/testurv.wsdl [ testurv_ptt::insert(VastAdresCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [testurv.VastAdres]. [Caused by: Cannot insert explicit value for identity column in table 'VastAdres' when IDENTITY_INSERT is set to OFF.]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [testurv.VastAdres]. [Caused by: Cannot insert explicit value for identity column in table 'VastAdres' when IDENTITY_INSERT is set to OFF.]
    Caused by Uitzondering [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Interne uitzondering: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert explicit value for identity column in table 'VastAdres' when IDENTITY_INSERT is set to OFF.Foutcode: 544
    Call:INSERT INTO dbo.VastAdres (ID, BeginDatum, Einddatum, Land, Plaats, Postcode, VolAdres) VALUES (?, ?, ?, ?, ?, ?, ?)
         bind => [null, 1894-06-24 00:00:00.0, 1872-09-04 00:00:00.0, Nederland, Wijdewormer, 1456 NR, Oosterdwarsweg 8]
    Query:InsertObjectQuery(<VastAdres null />).

    Hi,
    Click on the resources tab in the ESB system/ Project to see the ESB system design and all the components in it.
    Click on the Database adapter that you want to edit..and make the necesary changes..
    Check this link.
    http://download-uk.oracle.com/docs/cd/B31017_01/core.1013/b28764/esb008.htm for "6.8.2 How to Modify Adapter Services" section.
    If you are calling a database procedure which inturn makes the insert, you will have to make changes in the database and you job would be much simpler. It seems there are limitations on what you can change in the Database adapter once it is created. Please check the link for further details.
    Thanks,
    Rajesh

  • Error when inserting into dynamically created filename-file

    Howry
    Am am receiving the following error when i am trying to insert into a file that have a dynamic filename (through declared variable, as date etc.).
    I presume it is trying to look for the target file with the same name as the dynamic value passed through by the variable, but cannot find it- can anyone tell me how i can rather create the file as appose to insert into an already created file..?
    Your help in this regard is much appreciated.
    Here is the error:
    ODI-1217: Session SAPO_hlr_suburbs (1577001) fails with return code 7000.
    ODI-1226: Step 6_Ins_final fails after 1 attempt(s).
    ODI-1240: Flow 6_Ins_final fails while performing a Integration operation. This flow loads target table #l_date.unl.
    ODI-1228: Task 6_Ins_final (Integration) fails on the target FILE connection SAPO_HLR_SUBURBS.
    Caused By: java.sql.SQLException: File C:\Files\Gero work\ODI In Files\SAPO_HLR_SUBURBS/2012-01-24 12:06:13.463.unl was not found
         at com.sunopsis.jdbc.driver.file.FileConnection.prepareForWriting(FileConnection.java:339)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandInsert.execute(CommandInsert.java:50)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
         at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeUpdate(FilePreparedStatement.java:138)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java:68)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)

    What operating system are you using?
    The name of your file has the time within it , you cant have a filename with ':' in it on Windows.
    Try using ALPHANUMERIC datatype for the variable and pull the current datetime as a char with something like :
    select to_char( sysdate ,'YYYY-MM_DD HHMISS') from dual

  • ORA-01403: no data found error hile inserting into a table

    Hi,
    I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
    Please someone help me. Below is the code.
    CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
    IS
    BEGIN
       IF  t_array.count> 0 THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
        FOR i IN t_array.FIRST..t_array.LAST
        LOOP
            INSERT INTO XXDL_TEST
            VALUES(t_array(i).name )
      END LOOP;
    END IF;
    EXCEPTION
      WHEN OTHERS THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
    END;Thanks
    Alaka

    It looks like your Array is sparsely populated:
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(2) := 'B';
      8    l_tab(3) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    B
    C
    PL/SQL procedure successfully completed.
    SQL>
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(3) := 'B';
      8    l_tab(4) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    DECLARE
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
    You should also be using the FORALL syntax with INDICES OF. Check out The Docs

  • SQL Query produces different results when inserting into a table

    I have an SQL query which produces different results when run as a simple query to when it is run as an INSERT INTO table SELECT ...
    The query is:
    SELECT   mhldr.account_number
    ,        NVL(MAX(DECODE(ap.party_sysid, mhldr.party_sysid,ap.empcat_code,NULL)),'UNKNWN') main_borrower_status
    ,        COUNT(1) num_apps
    FROM     app_parties ap
    SELECT   accsta.account_number
    ,        actply.party_sysid
    ,        RANK() OVER (PARTITION BY actply.table_sysid, actply.loanac_latype_code ORDER BY start_date, SYSID) ranking
    FROM     activity_players actply
    ,        account_status accsta
    WHERE    1 = 1
    AND      actply.table_id (+) = 'ACCGRP'
    AND      actply.acttyp_code (+) = 'MHLDRM'
    AND      NVL(actply.loanac_latype_code (+),TO_NUMBER(SUBSTR(accsta.account_number,9,2))) = TO_NUMBER(SUBSTR(accsta.account_number,9,2))
    AND      actply.table_sysid (+) = TO_NUMBER(SUBSTR(accsta.account_number,1,8))
    ) mhldr
    WHERE    1 = 1
    AND      ap.lenapp_account_number (+) = TO_NUMBER(SUBSTR(mhldr.account_number,1,8))
    GROUP BY mhldr.account_number;      The INSERT INTO code:
    TRUNCATE TABLE applicant_summary;
    INSERT /*+ APPEND */
    INTO     applicant_summary
    (  account_number
    ,  main_borrower_status
    ,  num_apps
    SELECT   mhldr.account_number
    ,        NVL(MAX(DECODE(ap.party_sysid, mhldr.party_sysid,ap.empcat_code,NULL)),'UNKNWN') main_borrower_status
    ,        COUNT(1) num_apps
    FROM     app_parties ap
    SELECT   accsta.account_number
    ,        actply.party_sysid
    ,        RANK() OVER (PARTITION BY actply.table_sysid, actply.loanac_latype_code ORDER BY start_date, SYSID) ranking
    FROM     activity_players actply
    ,        account_status accsta
    WHERE    1 = 1
    AND      actply.table_id (+) = 'ACCGRP'
    AND      actply.acttyp_code (+) = 'MHLDRM'
    AND      NVL(actply.loanac_latype_code (+),TO_NUMBER(SUBSTR(accsta.account_number,9,2))) = TO_NUMBER(SUBSTR(accsta.account_number,9,2))
    AND      actply.table_sysid (+) = TO_NUMBER(SUBSTR(accsta.account_number,1,8))
    ) mhldr
    WHERE    1 = 1
    AND      ap.lenapp_account_number (+) = TO_NUMBER(SUBSTR(mhldr.account_number,1,8))
    GROUP BY mhldr.account_number;      When run as a query, this code consistently returns 2 for the num_apps field (for a certain group of accounts), but when run as an INSERT INTO command, the num_apps field is logged as 1. I have secured the tables used within the query to ensure that nothing is changing the data in the underlying tables.
    If I run the query as a cursor for loop with an insert into the applicant_summary table within the loop, I get the same results in the table as I get when I run as a stand alone query.
    I would appreciate any suggestions for what could be causing this odd behaviour.
    Cheers,
    Steve
    Oracle database details:
    Oracle Database 10g Release 10.2.0.2.0 - Production
    PL/SQL Release 10.2.0.2.0 - Production
    CORE 10.2.0.2.0 Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    Edited by: stevensutcliffe on Oct 10, 2008 5:26 AM
    Edited by: stevensutcliffe on Oct 10, 2008 5:27 AM

    stevensutcliffe wrote:
    Yes, using COUNT(*) gives the same result as COUNT(1).
    I have found another example of this kind of behaviour:
    Running the following INSERT statements produce different values for the total_amount_invested and num_records fields. It appears that adding the additional aggregation (MAX(amount_invested)) is causing problems with the other aggregated values.
    Again, I have ensured that the source data and destination tables are not being accessed / changed by any other processes or users. Is this potentially a bug in Oracle?Just as a side note, these are not INSERT statements but CTAS statements.
    The only non-bug explanation for this behaviour would be a potential query rewrite happening only under particular circumstances (but not always) in the lower integrity modes "trusted" or "stale_tolerated". So if you're not aware of any corresponding materialized views, your QUERY_REWRITE_INTEGRITY parameter is set to the default of "enforced" and your explain plan doesn't show any "MAT_VIEW REWRITE ACCESS" lines, I would consider this as a bug.
    Since you're running on 10.2.0.2 it's not unlikely that you hit one of the various "wrong result" bugs that exist(ed) in Oracle. I'm aware of a particular one I've hit in 10.2.0.2 when performing a parallel NESTED LOOP ANTI operation which returned wrong results, but only in parallel execution. Serial execution was showing the correct results.
    If you're performing parallel ddl/dml/query operations, try to do the same in serial execution to check if it is related to the parallel feature.
    You could also test if omitting the "APPEND" hint changes anything but still these are just workarounds for a buggy behaviour.
    I suggest to consider installing the latest patch set 10.2.0.4 but this requires thorough testing because there were (more or less) subtle changes/bugs introduced with [10.2.0.3|http://oracle-randolf.blogspot.com/2008/02/nasty-bug-introduced-with-patch-set.html] and [10.2.0.4|http://oracle-randolf.blogspot.com/2008/04/overview-of-new-and-changed-features-in.html].
    You could also open a SR with Oracle and clarify if there is already a one-off patch available for your 10.2.0.2 platform release. If not it's quite unlikely that you are going to get a backport for 10.2.0.2.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Getting an error when inserting a big table inside a ""-

    hi iam getting an error String not properly closed when i add big table inside a "".plz give me an idea how to insert a table inside a String.iam using jsp .
    thanks in advance

    1) Please use proper English grammar, spelling, punctuation, and capitalization.
    2) I don't know what you mean "convert this forum page to a Word doc." Are you talking about taking HTML that's served up from some arbitrary URL and saving it in a Word doc? If so, you would not have the page's content hardcoded in your JSP. If you need to hardcode the page's content in your JSP, then I'm still not understanding what you're doing.
    3) If you want to write it out in .doc format, then you need to use a library that can write that format, such as POI from jakarta: http://jakarta.apache.org/poi/
    4) Don't tell me not to say I don't understand. If I don't understand what you're saying, I'm going to say so. It would be stupid for me to pretend I understand when I don't.
    I don't think I can help you. Good luck.

  • Error when inserting into a internal table

    hello.
    I get the fowolling error.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
      and
    therefore caused a runtime error.
    The reason for the exception is:
    In a SELECT access, the read file could not be placed in the target
    field provided.
    Either the conversion is not supported for the type of the target field,
    the target field is too small to include the value, or the data does not
    have the format required for the target field.
    I did a join of 5 table and it is inseting into an interal table wich tpye is al the fields that i am pulling from the other tables. can someone please help. thanks

    Performance wise its not suggested to use CORRESPONDING FIELDS so better take care of the fields u are selecting into table by having the structure of internal table exactly like the fields u are selecting, in the same order.
    ex:
    types: begin of ty_vbap,
               vbeln  type vbeln,
               posnr type posnr,
              end of ty_vbap.
    data: it_vbap type standard table of ty_vbap.
    select vbeln posnr into table it_vbap from vbap where ...
    кu03B1ятu03B9к

Maybe you are looking for

  • HP OfficeJet 6600 won't scan to my Mac Mini

    HP OfficeJet 6600 won't scan to my Mac Mini

  • Font Issue with MX & OS 10.5.7

    Hi I am a long time user of Freehand and have just upgraded my laptop to the latest 17 Macbook pro running OS 10.5.7. I am having a problem when printing files from Freehand 11.0.2 in that a large number of my fonts are defaulting to courier when pri

  • Can I watch anything using the Apple TV?

    I am thinking about purchasing a Apple TV, but I am a little confused about what I can do with it. For example, if I want to watch something on the internet can I use the Apple TV to watch it on my TV? Or, if I have a DVD that I want to watch, can I

  • Cant get sound out of gstreamer apps

    Hey Gang, well I ran through the alsa wiki pages, the pulseaduio wiki pages and sound works great for everything. except for gstreamer. I'm running the gnome desktop enviorment, and everything that uses gstreamer doesnt get any sound output at all. N

  • Problems with Bootcamp partition solved using program: iPartition

    I Had real BOOTCAMP partition problems: 1. I couldn't see the partition in the startup list 2. I got an error message "missing operating system" 3. All this was a result of adding an extra Mac partition for Mavericks 4. I fixed it all with a program