Results 1 to 3 of 3

Thread: insert into table

  1. #1
    Join Date
    Mar 2004
    Posts
    11

    insert into table

    when i try to insert 25 tuples into a empty table, i got error "too many values", and only 20 tuples were inserted.

    //start of error message
    Exception in thread "main" java.sql.SQLException: ORA-00913: too many values

    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:2 89)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol .java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TT C7Protocol.java:109
    3)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery (OracleStatement.ja
    va:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther( OracleStatement.jav
    a:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStateme
    nt.java:2709)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(O racleStatement.java
    :796)
    at LoadItem.main(LoadItem.java:74)
    Press any key to continue . . .
    //end error

    When i try to insert via a java program 5 tuples into an empty table , i got "not enough values" error. 5 tuples were inserted.
    Connection Succeeded
    Everything cleared
    Record inserted
    Record inserted
    Record inserted
    Record inserted
    Record inserted
    Record inserted
    Exception in thread "main" java.sql.SQLException: ORA-00947: not enough values

    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:2 89)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol .java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TT C7Protocol.java:109
    3)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery (OracleStatement.ja
    va:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther( OracleStatement.jav
    a:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStateme
    nt.java:2709)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(O racleStatement.java
    :796)
    at LoadSupplier.main(LoadSupplier.java:74)
    Press any key to continue . . .
    //end
    Pls let me know how to configure so that i can add any number of tuples into the tables.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Sounds like you have too many columns in VALUES part of insert statement. Check if you have comma in the values.

    Similarly you may be missing a comma and trying to insert less number of columns than there is in the table.

  3. #3
    Join Date
    Mar 2004
    Posts
    11
    thanks. that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •