Problem Inserting Values in resultset

Hi Friends,
Any help regarding this would be welcomed.
Please Help me.I am new to J2EE Programming.Our web project which we deploy on Tomcat 5.0.28 works perfectly fine when connected to Sybase ASA Database we have a new client requirement for which we have to connect it using Oracle 9i as the database.For doing the same i installed Oracle 9i(i have also tried with 8i)on my system copied the JDBC driver to the correct directory in Tomcat it got connected and is retriving data from the database perfectly.But when we try to insert a colum in the datbase using a result set it fails .The ResultSet rs is created properly(No Exception Thrown there) then the statement rs.moveToInsertRow(); also goes ahed without a problem but after taking the values when rs.insertRow(); is executed it throws an exception i.e. ORA-01732: data manipulation operation not legal on this view which I think is an exception from the oracle side whereas we are not manipulating any views we are inserting directly into the database tables. I would like to mention that to connect to oracle we are using the classes12.jar driver and the path for the same in the code is oracle.jdbc.driver.OracleDriver i have also tried it with the thin driver but same error reported.

Yes, inserts into MS Access work.
There doesn't appear to be anything wrong with your code.
So something besides what you have posted is the problem:
-autocommit
-wrong database
-ignoring errors
-something else.

Similar Messages

  • Problem inserting value in CLOB column from an XML file using XSU

    Hi,
    When I try to insert CLOB value into Oracle9i database from an XML document using XSU, I get an exception as below.
    09:37:32,392 ERROR [STDERR] oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: ORA-03237: Initial Extent of specified size cannot be allocated
    ORA-06512: at "SYS.DBMS_LOB", line 395
    ORA-06512: at line 1
    ' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    All Element tags in XML doc. is mapped to columns in the database. One of the table columns is CLOB. That is the one that gives the above exception. Here is the xml...
    ID - is autogenerated value.
    <?xml version="1.0" ?>
    <ROWSET>
    <ROW num="1">
    <ID></ID>
    <SEQ>
    GCATAGTTGTTATGAAGAAATGGAAGAAAAATGCACTCAAAGTTGGGCTGTCAGGCTGTCTGGGGCTGAATTCTGGTGTGACAGTGTGATGAAGCCATCTTTGAGCCTAAATTTGATAATGAGCCAGTCATGATCTGGTTGTGATTACTATAACAAGATTAAATCTGAATAAGAGAGCCACAACTTCTTTAAAGACAGATTGTCAAGTCATTACATGGAAGAGGGAGATTGCTCCTTTGTAAATCAGGCTGTCAGGCCAACTGAATGAAGGACGTCATTGTACAGTAACCTGATGAAGATCAGATCAACCGCTCACCTCGCCG
    </SEQ>
    </ROW>
    </ROWSET>
    Can anyone identify what's the problem.. and suggest a solution for this..?
    Thanks in advance..
    Viji

    Would you please specify the XDK verison and database version?

  • Insert values to access through checkboxes

    hi,
    i need to get insert values into the ms-access database through clicking checkboxes.let me tell in detail.
    iam writing jsp source for inserting data into the msaccess. when i insert text data type those records are inserting but, when i write checkbooxes in the form and submit to access. it is giving as datatype mismatch cretirial. i donot know how to do. i am giving that code. please help me. thanks
    i need the code for using bean with jsp. ie, business logic should be saved in java bean . and properties in the jsp. idonot know how to use bean to insert update database(ms-access) with jsp. kindly giv e code for the bean and jsp.when i go google search those are not executing.anybody can give that code please
    thanks<%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
    <%! Connection conn;
       PreparedStatement stmtSelect;
       PreparedStatement stmtInsert;
       PreparedStatement stmtUpdate;
    public void jspInit() {
        try{
          String url  = "jdbc:odbc:databaseone";
          String id   = "myID";
          String pass = "myPass";
          String sqlSelect 
            = "SELECT * FROM garden1 WHERE(LOWER(Genus) " +
              "LIKE ? OR LOWER(Species) LIKE ?) ORDER BY id";
          String sqlInsert="INSERT INTO garden1(id,family,Genus,Species,id_code,author,commonname) VALUES (?,?,?,?,?,?,?)";
       String sqlUpdate="UPDATE garden1 SET id=?, family =?, Genus = ?, Species= ?, id_code = ?,author=?,commonname=? WHERE id= ?";
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          conn = DriverManager.getConnection(url, id,pass);
          stmtSelect = conn.prepareStatement(sqlSelect);
          stmtInsert = conn.prepareStatement(sqlInsert);
          stmtUpdate = conn.prepareStatement(sqlUpdate);
        }catch(SQLException e){}
        catch(ClassNotFoundException e){}
      public void jspDestroy() {
        try {
           stmtSelect.close();
         stmtInsert.close();
         stmtUpdate.close();
           conn.close();
        } catch(SQLException e) {}
    %>
    <% if (request.getParameter("action")== null) { %>
    <%
    java.sql.Connection con;   
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    java.util.Properties props = new
    java.util.Properties();
    con =
    DriverManager.getConnection("jdbc:odbc:databaseone","myID","myPass");
    java.sql.Statement stmt;
    java.sql.ResultSet rs;
    java.sql.ResultSetMetaData metaData;
    int numCols;
    stmt = con.createStatement();
    rs = stmt.executeQuery("Select * from garden1");
    metaData = rs.getMetaData();
    numCols = metaData.getColumnCount();
    %> <h4 align=left >TABLE OF employee</H4>
    <TABLE BORDER="1" ALIGN=CENTER>
    <THEAD>
    <TD><B>ID</B></TD>   
       <TD><B>FAMILY</B></TD>
       <TD><B>GENUS</B></TD>
    <TD><B>SPECIES</B></TD>
    <TD><B>ID-CODE</B></TD>
    <TD><B>AUTHOR</B></TD>
    <TD><B>COMMON-NAME</B></TD>
    </THEAD>
    <TR>
    <% while(rs.next()) { %>
    <% for(int i=1; i <= numCols; i++)  { %>
       <TD><%= rs.getString(i) %></td>
    <%   
    }  //  end of for loop
    out.println("</tr>");
    }  //  end of while loop
    rs.close();
    %>      
    <HTML>  <HEAD><TITLE>Add/UpdateDatabase</TITLE></HEAD><body>
    <FORM METHOD="post"  ACTION="<%= request.getRequestURI()%>">
      <INPUT TYPE="hidden" NAME="action" VALUE="form">
      <INPUT TYPE="submit" name=newentry VALUE="New Entry"><BR>  <BR>   </FORM> </BODY> </HTML>
    <% } else if
    (request.getParameter("action").equals("form")) { %>
    <% String id="", family="", Genus ="",Species="";
           String id_code="",author="";
           String commonname="";
      if (request.getParameter("query") != null) {
          String searchVar =request.getParameter("query");
            try{
                ResultSet rset = null;
               synchronized(stmtSelect){ stmtSelect.setString(1, "%" + searchVar +"%");
                            stmtSelect.setString(2, "%" + searchVar +"%");
                            rset = stmtSelect.executeQuery();
             if (rset.next()) {
             if (rset.getString("id") != null) id =   rset.getString("id");
                    if (rset.getString("family") != null)family=  rset.getString("family");
                    if (rset.getString("Genus") != null)Genus =  rset.getString("Genus");
                    if (rset.getString("Species") != null)Species =rset.getString("Species");
                    if (rset.getString("id_code") != null)id_code =rset.getString("id_code");
                    if (rset.getString("author") != null)author =rset.getString("author");
                    if (rset.getString("commonname") != null)commonname =   rset.getString("commonname");
          if (rset.next())
    out.print("<SCRIPT>alert(\"The search you made hasmore than one result! Use your browser's back buttonto refine search.\")</SCRIPT>");
        } catch(SQLException e){}
    %> <HTML> <HEAD> <TITLE>Database Entry</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <H2>Database Entry:</H2>
    <FORM METHOD="post" ACTION="<%=request.getRequestURI() %>">
        <TABLE WIDTH="400" BORDER="0"><TR> <DIV ALIGN="right">
         <TD>   ID:  </TD>  <TD> <INPUT TYPE="text" NAME="id" VALUE="<%= id%>"> </TD></tr><tr>
         <TD> family:</TD><TD>   <INPUT TYPE="checkbox" NAME="family" VALUE="<%=family %>">  </TD></tr><tr>
         <TD> genus:</TD><TD><INPUT TYPE="text" NAME="Genus" VALUE="<%=Genus %>"> </TD> </tr><tr>
         <TD> species:</TD><TD> <INPUT TYPE="text" NAME="Species"VALUE="<%= Species %>"> </TD></tr><tr>
         <TD>idcode:</td><TD><INPUT TYPE="text" NAME="id_code"VALUE="<%= id_code%>"> </TD></tr><tr> 
         <TD>author:</TD><TD><INPUT TYPE="text" NAME="author"  VALUE="<%= author%>">   </TD></tr><tr>
         <TD>commonname:</TD><TD><INPUT TYPE="checkbox" NAME="commonname" VALUE="<%= commonname%>"> </TD> </TR></div>
            <TR>  <TD WIDTH="100">    <INPUT TYPE="submit" NAME="Submit"VALUE="Submit"> </TD>
            <TD WIDTH="300">   <INPUT TYPE="reset" NAME="Reset"VALUE="Reset">
          <% if (id != ""){ %>
             <INPUT TYPE="hidden" NAME="action"VALUE="update">
          <% } else { %>
             <INPUT TYPE="hidden" NAME="action"VALUE="insert">
             <INPUT TYPE="hidden" NAME="action"VALUE="select">  
          <%}  %>       </TD>     </TR>   </TABLE> </FORM> </BODY> </HTML>
    <% } else if
    (request.getParameter("action").equals("insert")) { %>
    <%
    try{
         synchronized(stmtInsert){
          stmtInsert.setString(1,request.getParameter("id"));
           stmtInsert.setString(2,request.getParameter("family")); 
           stmtInsert.setString(3,request.getParameter("Genus"));
           stmtInsert.setString(4,request.getParameter("Species"));
           stmtInsert.setString(5,request.getParameter("id_code"));
           stmtInsert.setString(6,request.getParameter("author"));
           stmtInsert.setString(7,request.getParameter("commonname"));
           stmtInsert.executeUpdate(); 
       out.print("Record Successfully Entered. <BR><A HREF=\"" + request.getRequestURI() +
               "\">Return</A>");
       } catch (SQLException e){
         out.print("Record Entry Failed! <BR><A HREF=\"" + request.getRequestURI() +
               "\">Return</A>");
         out.print("<br>" + e.getMessage());
    } else if
    (request.getParameter("action").equals("update")) {
      try{
         synchronized(stmtUpdate){
          stmtUpdate.setString(1,request.getParameter("id"));
              stmtUpdate.setString(2,request.getParameter("family")); 
              stmtUpdate.setString(3,request.getParameter("Genus"));
              stmtUpdate.setString(4,request.getParameter("Species"));
              stmtUpdate.setString(5,request.getParameter("id_code"));
              stmtUpdate.setString(6,request.getParameter("author"));
              stmtUpdate.setString(7,request.getParameter("commonname"));
           stmtUpdate.executeUpdate();
       out.print("Record Successfully Updated. <BR>" +
               "<A HREF=\"" + request.getRequestURI() +
               "\">Return</A>");
       } catch (SQLException e){
         out.print("Record Update Failed! <BR>" +
               "<A HREF=\"" + request.getRequestURI() +
               "\">Return</A>");
         out.print("<br>" + e.getMessage());
    %>
    <% } %>

    Oh...also...
    It seems that you haven't sufficiently normalized the problem (I've seen absolutely zero problems that, when sufficiently normalized, require 1000 columns).
    Perhaps you should think about doing two tables, one with "Machines" and the other with "MachineData". The Primary Key from the Machines table could be a foreign key into the MachineData table, in which all of your data is stored.
    If you're serious about using an RDBMS for problems more complex than tracking your home music library, I'd recommend reading up on at least a bit of database theory (but I'm an admitted nerd, and find it interesting anyhow).
    I'd heartily recommend "Fundamentals of Database Systems" by Navathe and Elmasri as a starting point.

  • Netweaver Error in Logs - JRA - Could Not Insert Row To ResultSet

    Hi there
    we have an MII 12.1.5 instance (with Patch) installed on a Netweaver platform (SP 3).  We're using the JRA action blocks to call an RFC (we populate the request doc with multiple nodes first) and they're all executing completely without any problems at face value.  When I look at the Netweaver logs (MII filter on), I'm getting quite a few entries per transaction run which hold the following Error Messages:
    Message:
    Could Not Insert Row To ResultSet
    Category:
    /Applications/XMII/Xacute
    or
    com.sap.xmii.storage.connections.JRAUtil
    Location:
    com.sap.xmii.storage.connections.JRAUtil
    Application:
    sap.com/xappsxmiiear
    Has anyone seen these errors or know what could be causing them?
    Thanks,
    Lawrence

    Hi.
    This is a known issue and have been there in some versions, the JRA action block seems to be working (but causes this problem in the Netweaver log) and the JCO action block do not have this problem.
    I have just reported as an OSS to SAP.
    BR
    Poul.
    Edited by: Poul Klemmensen on Apr 12, 2010 4:57 PM

  • : "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

     Hi   .
        I was creating the  pass the values t in temp tables  though s sis package vs2012 .
      First I was taken on executive SQL TASK.
     IN EXCUTIVE SQL TASK  . I was write the stored proce:
    Sp;
    reate  procedure  USP_GETEMP2333
    AS
    begin
    Select  eid,ename,dept,salary from emp
    end;
    create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
      insert into #temp
       exec USP_GETMP02333
       go.
     It was executive correctly.
     I was taken another sequence container. In the sequence container iam creating one   executive  sql
    In 2<sup>nd</sup> excutive sql task: sql statements is
    if object_id('emp_fact_sal') is not null
     drop table emp_fact_sal
    select eid,ename as emp_name,sal_bar=
    case when salary<=5000 then 'l'
    when salary >5000 and salary<=7000 then 'm'
    else
    'h'
    end
    into emp_fact_sal from #temp.
     and one falt flies  it was taken to designation .
     iam changing  all  connection properties:
     in oldeb connection:
    in excutive sal task properties .
    delay validation is true,
    and retain connection maner is also true,
    and package mode is 64 bit is false.
     But iwas excutive in 2<sup>nd</sup> excutive ql task .
    Iam getting this type of errors,
                    [Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
     drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
     Please help me

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • How to receive parameters from a form and insert values in db using servlet

    Hi friends,
    My first question here.
    I'm trying to create a Servlet that takes input from a form and process it and insert it in database.tablename.
    My MAIN ISSUE IS WITH THE NUMBER OF COLUMNS THAT WOULD BE DYNAMIC AND THUS CANT RECEIVE THE PARAMETERS IN STATIC CODE.
    Here is the form code
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <form action="Test" method="post" />
    <table width="90%" border="1" cellspacing="1" cellpadding="1">
    <tr>
    <th scope="col">Student Name</th>
    <th scope="col">RollNo</th>
    <th scope="col">Java</th>
    <th scope="col">J2ee</th>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    </table>
    <input type ="submit" value="insert values in the database now"/>
    </form>
    </html>
    And here is the Servlet
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.io.*;
    public class Test extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Module: Process Result Values from previous page";
    out.println("<html>\n" +
    "<head><title>" + title + "</title></head>\n" +
    "<body>");
              try
                   Class.forName("com.mysql.jdbc.Driver");
                   Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/","root", "root");
                   Statement s = con.createStatement();
    ResultSet res = s.executeQuery("SELECT * FROM dbname.tablename");
    ResultSetMetaData rmeta=res.getMetaData();
    int noofcolumns=rmeta.getColumnCount();
                   if(!con.isClosed())
              catch(Exception e)
    System.out.println("Exception"+e);
    out.println(e);
    if(connectionFlag==1)
    out.println("</body></html>");
    doGet(request, response);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    This is the basic code structure and I'm trying to figure out this special case with handling the multiple parameters:
    1. I dont' want to use String []a=request.getParameterValues("studentname"); as hard code. The reason being the number of rows will be diyamic and I would like to get the column name and then then use an array of string to take values. But how can I connect these to form a query so that the rows goes on inserted one after other.
    Thanks,
    Mashall

    Thank you for your help.
    I'm something close to it but this segment of code throws a NullPointerException Error. I counted number of rows and columns using the methods getColumnCount() and getColumnName(i).
    ResultSetMetaData md = res.getMetaData(); //Get meta data for the resultset
    int noofcolumns=md.getColumnCount();
    out.println("<br />Number of columns in table (including name and roll number) :::: "+noofcolumns+"<br />");
    for(int i=1;i<=noofcolumns;i++) // access column 1....n
    String columnname = md.getColumnName(i); // get name of column 1....n
    out.println("<br />Current column name ::: "+columnname+"<br />"); //check if the name appear correct.
    String []columndata = request.getParameterValues(columnname); //Get raw value in array
    for(int j=1;j<=rows;j++) // here rows is number of rows in each column
    out.println("To be inserted: <b>"+columndata[j]+"</b> in Row ::: "+j+"<br />");
    //The line above thows null pointer exception.
    }

  • How can I insert values from table object into a regular table

    I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
    CREATE TABLE ITEM
    ITEMID VARCHAR2(10) NOT NULL,
    PRODUCTID VARCHAR2(10) NOT NULL,
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE T_ITEM_OBJ AS OBJECT
    ITEMID VARCHAR2(10),
    PRODUCTID VARCHAR2(10),
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
    PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
    When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
    In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
    INSERT INTO ITEM
    ITEMID,
    PRODUCTID,
    LISTPRICE,
    UNITCOST,
    STATUS,
    SUPPLIER,
    ATTR1
    ) SELECT ITEMID, PRODUCTID, LISTPRICE,
    UNITCOST, STATUS, SUPPLIER, ATTR1
    FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
    WHERE it.ITEMID != NULL;
    COMMIT;
    Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
    Thanks.

    Sigh. I answered this in your other How can I convert table object into table record format?.
    Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
    Thank you for your future co-operation.
    Cheers, APC

  • Inserted value too large for column

    Hi,
    I have a table (desc below), with only one trigger wich fill the operatcreat, operatmodif, datecreat and datemodif column at insert and update for each row. When I try to insert, I got the following messages :
    INSERT INTO tarifclient_element(tarifclient_code,article_code,prix) VALUES('12','087108',3.94);
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01401: inserted value too large for column
    SQL> desc tarifclient_element
    Name Null? Type
    TARIFCLIENT_CODE NOT NULL CHAR(10)
    ARTICLE_CODE NOT NULL CHAR(20)
    PRIX NUMBER
    OPERATCREAT NOT NULL VARCHAR2(30)
    OPERATMODIF VARCHAR2(30)
    DATECREAT NOT NULL DATE
    DATEMODIF DATE
    NB : tarifclient_code is an ENABLED fk, article_code is a DISABLED fk. All values exists in both referenced tables.
    Any idea ?

    My trigger is not the problem, I tried to delete it and fill the columns manually and got the same error.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by allanplumb ():
    The SQL you have shown us looks OK
    (to me, au moins). However, perhaps the
    error is in the trigger which fills in
    the two operativ fields. It would execute
    at the same time as your insert, near
    enough.
    -- Allan Plumb<HR></BLOCKQUOTE>
    null

  • ORA-01401: inserted value too large for column from 9i to 8i

    Hi All,
    Am trying to get the data from 9.2.0.6.0 to 8.1.7.0.0.
    The character sets in both of them are as follows
    9i
    NLS_NCHAR_CHARACTERSET : AL16UTF16
    NLS_CHARACTERSET : AL32UTF8
    8i
    NLS_NCHAR_CHARACTERSET : UTF8
    NLS_CHARACTERSET : UTF8
    And the structure of the Table in 9i which am trying to pull is as follows.
    SQL> desc xyz
    Name Null? Type
    PANEL_SITE_ID NOT NULL NUMBER(15)
    PANELIST_ID NUMBER
    CHECKSUM VARCHAR2(150)
    CONTACT_PHONE VARCHAR2(100)
    HH_STATUS NUMBER
    HH_STATUS_DT DATE
    HH_RECRUITMENT_PHONE VARCHAR2(100)
    HH_RECRUITMENT_DT DATE
    FIRST_NET_USAGE_DT DATE
    INSTALL_DT DATE
    FNAME VARCHAR2(4000)
    LNAME VARCHAR2(4000)
    EMAIL_ADDRESS VARCHAR2(200)
    EMAIL_VALID NUMBER
    PASSWORD VARCHAR2(4000)
    And by connecting to one of the 8i schema am running the following script
    CREATE TABLE GPMI.GPM_HOUSEHOLDBASE_FRMP AS
    SELECT PANEL_SITE_ID,
    PANELIST_ID,
    LTRIM(RTRIM(CHECKSUM)) CHECKSUM,
    LTRIM(RTRIM(CONTACT_PHONE)) CONTACT_PHONE,
    HH_STATUS, HH_STATUS_DT,
    LTRIM(RTRIM(HH_RECRUITMENT_PHONE)) HH_RECRUITMENT_PHONE,
    HH_RECRUITMENT_DT,
    FIRST_NET_USAGE_DT,
    INSTALL_DT, LTRIM(RTRIM(FNAME)) FNAME,
    LTRIM(RTRIM(LNAME)) LNAME,
    LTRIM(RTRIM(EMAIL_ADDRESS)) EMAIL_ADDRESS,
    EMAIL_VALID,
    PASSWORD
    FROM [email protected];
    Am gettinh the following error.
    Can anyone of you fix this one.
    PASSWORD
    ERROR at line 14:
    ORA-01401: inserted value too large for column
    Thanks in Advance
    Sudarshan

    Additionally I found this matrix, which explains your problem:
    UTF8 (1 to 3 bytes) AL32UTF8 (1 to 4 bytes)
    MIN MAX MIN MAX
    CHAR 2000 666 2000 500
    VARCHAR2 4000 1333 4000 1000 */
    For column PASSWORD the maximum length is used (4000). UTF8 uses maximal 3 bytes for a character, while AL32UTF8 may use up to 4 characters. So a column defined in AL32UTF8 may contain characters, which do not fit in a corresponding UTF8 character.

  • Oracle 10g - Insert value into a self-created table in stored proc

    Hi all,
    Say I'm creating a table using the following logic,
    pc_create_table := 'create global temporary table revs(var1 number(5,0), ..., ...,) on commit preserve rows';
    execute immediate pc_create_table;
    When I'm attempting to insert value into this table (v_var1 is a pre-defined variable),
    pc_insert_value := 'insert into revs(var1, ..., ...,) values (v_var1, ...)'
    execute immediate pc_insert_value;
    I got the following error: "ORA-00984: column not allowed here"
    Any advise on this issue? Thanks a lot

    isaacniu wrote:
    However I got two errors in that line,
    Error(68,6): PL/SQL: SQL Statement ignored
    Error(68,18): PL/SQL: ORA-00942: table or view does not existAnd why do you want your PL/SQL code to run DDLs??
    Its not designed that way, is not a good practice and is strictly not recommended. You can read <a href ="https://forums.oracle.com/forums/profile.jspa?userID=287238">Billy Verreynne's</a> take on this :
    {message:id=10040770}
    To my suprise it's saying the table or view does not exist. According to my logic, the table "revs" created by executing pc_create_table, however it's NOT explicitly declared in other parts of this script, is this where the problem is?The Problem is, SQLs fired using Execute Immediate are evaluated, compiled, parsed and executed at run time. So when you compile procedure pc_create_table, table revs is still not created. Hence you get error when you try inserting rows in it.
    Any advises are appreciated.Get the table created by your DBA, and use insert statement without execute immediate in your procedure.

  • 'ORA-01401 inserted value too large for column' - 9i

    I am migrating a java application from 8i to 9i. The application is writing data to a oracle 8i database without any problem.
    When the underlying database source is switched to oracle 9i database(same databaseschema as 8i) by pointing to 9i instance , the application is
    encountering the error: 'ORA-01401 inserted value too large for column' when trying to insert a particular field. The fileld is declared as varchar2(400) in the both the database.
    The debug output from application also shows that the column data being inserted as 10 characters.The insert statement from SQLPLUS works fine. So it's looks like an issue with the JDBC driver for the 9i server. I am wondering if anyone has observed such strange behavior.
    Thanks
    Vijay

    Vijay,
    Are you using OCI driver ? There is a known issue with OCI driver when using setFixedCHAR before an INSERT statement. This problem only happens with a string of length zero. There is no known issue with THIN Driver. This is fixed in Oracle9i Release 2.
    regards
    Debu Panda
    Oracle

  • ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"

    Hi,
    Oracle version :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Funny issue,
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT ta.as
                          FROM   tac ta
                          WHERE  ta.acn         = '145'
                          AND    ta.ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );When i try to run this , get
    Error report:
    SQL Error: ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"
    38101. 00000 - "Invalid column in the INSERT VALUES Clause: %s"
    *Cause:    INSERT VALUES clause refers to the destination table columns
    *Action:
    Now, when I try n remove the alias name from the insert clause, i.e.
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT as
                          FROM   tac
                          WHERE  acn         = '145'  -------- remove alias from here i.e. 'ta'
                          AND   ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );The above statement fine.
    Edited by: user8650395 on Mar 12, 2010 6:10 AM
    Edited by: user8650395 on Mar 12, 2010 6:19 AM

    Hi,
    Nice formatting!
    The first value in the INSERT clause looks suspicious:
    MERGE INTO tfc         cb1
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,     ...If tfc is a table name, then it can't be a sequnece name.
    Perhaps you meant something like
    ...            VALUES
                        (tfc_id_seq.NEXTVAL,     ...I hope that solves the problem.
    If not, post a little sample data (CREATE TABLE and INSERT statements) for the tables as they exist before the MERGE.
    Edited by: Frank Kulash on Mar 12, 2010 9:34 AM

  • Inserted value too large column: n

    Hi All,
    I'm loading some large flat files onto SAP HANA and the error file contains a large amount of errors stating that "ROLLBACK - inserted value too large for column: 104 >>". I'm getting a lot of errors and the number showing next to column varies. For example, the following are just an extract of the errors (I've removed the actual data after >>):
    ROLLBACK - inserted value too large for column: 104 >> .
    ROLLBACK - inserted value too large for column: 146 >>
    ROLLBACK - inserted value too large for column:  264 >>
    ROLLBACK - inserted value too large for column: 275 >>
    ROLLBACK - inserted value too large for column: 969 >>
    ROLLBACK - inserted value too large for column: 1140 >>
    For a sample, I have check every column against the definition of the table that it is being loaded into. All values are less than the size of each column and there are no special characters.
    My question is, what is the number that the error message is referring to. It's not the column number, nor is it the line position. Any tips for identifying the problem column, without change the column definition 1 by 1.
    Regards,
    Gary Elliott

    Hi Gary,
    Please refer the below thread which talks about the similar issue...
    [ROLLBACK] - inserted value too large for column: 9000000 >>
    Rgds,
    Murali

  • Getting error ORA-01401: inserted value too large for column

    Hello ,
    I have Configured the scenario IDOC to JDBC .In the SXMB_MONI am getting the succes message .But in the Adapter Monitor am getting the error message as
    ORA-01401: inserted value too large for column and the entries also not inserted in to the table.I hope this is because of the date format only.In Oracle table date field has defined in the format of '01-JAN-2005'.I am also passing the date field in the same format only for INVOICE_DATE and INVOICE_DUE_DATE.Please see the target structure .
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:INVOICE_INFO_MT xmlns:ns="http://sap.com/xi/InvoiceIDoc_Test">
    - <Statement>
    - <INVOICE_INFO action="INSERT">
    - <access>
      <INVOICE_ID>0090000303</INVOICE_ID>
      <INVOICE_DATE>01-Dec-2005</INVOICE_DATE>
      <INVOICE_DUE_DATE>01-Jan-2005</INVOICE_DUE_DATE>
      <ORDER_ID>0000000000011852</ORDER_ID>
      <ORDER_LINE_NUM>000010</ORDER_LINE_NUM>
      <INVOICE_TYPE>LR</INVOICE_TYPE>
      <INVOICE_ORGINAL_AMT>10000</INVOICE_ORGINAL_AMT>
      <INVOICE_OUTSTANDING_AMT>1000</INVOICE_OUTSTANDING_AMT>
      <INTERNAL_USE_FLG>X</INTERNAL_USE_FLG>
      <BILLTO>0004000012</BILLTO>
      <SHIPTO>40000006</SHIPTO>
      <STATUS_ID>O</STATUS_ID>
      </access>
      </INVOICE_INFO>
      </Statement>
      </ns:INVOICE_INFO_MT>
    Please let me know what are all the possible solution to fix the error and to insert the entries in the table.
    Thanks in Advance!

    Hi muthu,
    // inserted value too large for column
    When your oracle insertion throws this error, it implies that some value that you are trying to insert into the table is larger than the allocated size.
    Just check the format of your table and the respective size of each field on your oracle cleint by using the command,
    DESCRIBE <tablename> .
    and then verify it with the input. I dont think the problem is with the DATE format because if it is not a valid date format, you would have got on error like
    String Literal does not match type
    Hope this helps,
    Regards,
    Bhavesh

  • Inserted value too large for column Error

    I have this table:
    CREATE TABLE SMt_Session
         SessionID int NOT NULL ,
         SessionUID char (36) NOT NULL ,
         UserID int NOT NULL ,
         IPAddress varchar2 (15) NOT NULL ,
         Created timestamp NOT NULL ,
         Accessed timestamp NOT NULL ,
         SessionInfo nclob NULL
    and this insert from a sp (sp name is SMsp_SessionCreate):
         Now := (SYSDATE);
         SessionUID := SYS_GUID();
         /*create the session in the session table*/
         INSERT INTO SMt_Session
                   ( SessionUID ,
                   UserID ,
                   IPAddress ,
                   Created ,
                   Accessed )
         VALUES           ( SMsp_SessionCreate.SessionUID ,
                   SMsp_SessionCreate.UserID ,
                   SMsp_SessionCreate.IPAddress ,
                   SMsp_SessionCreate.Now ,
                   SMsp_SessionCreate.Now );
    It looks like the param SessionUID is the one with trouble, but the length of sys_guid() is 32, and my column has 36.
    IPAddress is passed to the sp with value '192.168.11.11', so it should fit.
    UserID is 1.
    I am confused, what is the column with problem ?

    CREATE OR REPLACE PROCEDURE SMsp_SessionCreate
         PartitionID IN      INT ,
         UserID IN      INT ,
         IPAddress IN      VARCHAR2 ,
         SessionID IN OUT      INT,
         SessionUID IN OUT      CHAR,
         UserName IN OUT      VARCHAR2,
         UserFirst IN OUT      VARCHAR2,
         UserLast IN OUT      VARCHAR2,
         SupplierID IN OUT      INT,
         PartitionName IN OUT      VARCHAR2,
         Expiration IN      INT ,
         RCT1 OUT      GLOBALPKG.RCT1
    AS
         Now DATE;
         SCOPE_IDENTITY_VARIABLE INT;
    BEGIN      
         Now := SYSDATE;
         -- the new Session UID      
         SessionUID := SYS_GUID();
         /*Cleanup any old sessions for this user*/
         INSERT INTO SMt_Session_History
                   ( UserID ,
                   IPAddress ,
                   Created ,
                   LastAccessed ,
                   LoggedOut )
         SELECT
                   UserID,
                   IPAddress,
                   Created,
                   Accessed,
                   TO_DATE(Accessed + (1/24/60 * SMsp_SessionCreate.Expiration))
         FROM SMt_Session
         WHERE     UserID = SMsp_SessionCreate.UserID;
         --delete old     
         DELETE FROM SMt_Session
         WHERE UserID = SMsp_SessionCreate.UserID;
         /*create the session in the session table*/
         INSERT INTO SMt_Session
                   ( SessionUID ,
                   UserID ,
                   IPAddress ,
                   Created ,
                   Accessed )
         VALUES           ( SMsp_SessionCreate.SessionUID ,
                   SMsp_SessionCreate.UserID ,
                   SMsp_SessionCreate.IPAddress ,
                   SMsp_SessionCreate.Now ,
                   SMsp_SessionCreate.Now );
         SELECT SMt_Session_SessionID_SEQ.CURRVAL INTO SMsp_SessionCreate.SessionID FROM dual;
         --SELECT SMt_Session_SessionID_SEQ.CURRVAL INTO SCOPE_IDENTITY_VARIABLE FROM DUAL;
         --get VALUES to return
         SELECT u.AccountName INTO SMsp_SessionCreate.UserName FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.SupplierID INTO SMsp_SessionCreate.SupplierID FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.FirstName INTO SMsp_SessionCreate.UserFirst FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.LastName INTO SMsp_SessionCreate.UserLast FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         BEGIN
              FOR REC IN ( SELECT
                   u.AccountName,
                   u.SupplierID,
                   u.FirstName,
                   u.LastName FROM SMt_Users u
         WHERE     UserID = SMsp_SessionCreate.UserID
              LOOP
                   SMsp_SessionCreate.UserName := REC.AccountName;
                   SMsp_SessionCreate.SupplierID := REC.SupplierID;
                   SMsp_SessionCreate.UserFirst := REC.FirstName;
                   SMsp_SessionCreate.UserLast := REC.LastName;
              END LOOP;
         END;
         BEGIN
              FOR REC IN ( SELECT PartitionName FROM SMt_Partitions
         WHERE     PartitionID = SMsp_SessionCreate.PartitionID
              LOOP
                   SMsp_SessionCreate.PartitionName := REC.PartitionName;
              END LOOP;
         END;
         /*retrieve all user roles*/
         OPEN RCT1 FOR
         SELECT RoleID     FROM SMt_UserRoles
         WHERE     UserID = SMsp_SessionCreate.UserID;
    END;
    this is the exact code of the sp. The table definition is this:
    CREATE TABLE SMt_Session
    SessionID int NOT NULL ,
    SessionUID char (36) NOT NULL ,
    UserID int NOT NULL ,
    IPAddress varchar2 (15) NOT NULL ,
    Created timestamp NOT NULL ,
    Accessed timestamp NOT NULL ,
    SessionInfo nclob NULL
    The sp gets executed with this params:
    PARTITIONID := -2;
    USERID := 1;
    IPADDRESS := '192.168.11.11';
    SESSIONID := -1;
    SESSIONUID := NULL;
    USERNAME := '';
    USERFIRST := '';
    USERLAST := '';
    SUPPLIERID := -1;
    PARTITIONNAME := '';
    EXPIRATION := 300;
    if I ran the code inside the procedure in sql+ (not the procedure), it works. when i call the sp i get the error
    inserted value too large for column
    at line 48

Maybe you are looking for

  • Apple loops location question

    why do some of the loops in the (assumed to be) default folder not appear in the garageband loop browser. no drums seem to appear in the loop browser...

  • Safari 1.3.2 suddenly started crashing on iMac G5 OS 10.3.9

    I do most of my work on a MacBook Pro but have kept an old iMac G5 for occasional use when I want a large screen and it has worked well for some years. Having not used it for some time, when I tried yesterday Safari kept crashing. My home page is Goo

  • Installing SQL Server 2008 Express on windows 2000 server ?

    Is is possible to install SQL Express 2008 on a Windows 2000 machine. Has anybody come across any issues doing this. any advice would appreciated. Thanks in advance Jayce.

  • Down Payment Process in SD

    Hi All, We want to implement a down payment progress in our system. I did all of the customizing requirements in SD according to OSS Note 213526. Furthermore, when I placed an sales order in VA01 and then invoiced in VF01(only invoiced the value in b

  • Apple DVD Player software not reading SPRM 4 correctly.

    I am a DVD author and have recently run into an issue with Apple DVD Player not reading SPRM 4 (current title) correctly. I know this isn't the Apple DVD Player forum, but there doesn't seem to be one for that application, so here I am... I have a di