Error in update statement

Hai All
update dail set timeout=out_time where attend_date=r1.bardate and
(select bar_code from empl_barcode where empl_barcode.barcode=r1.barcode);
I got an error in my update statement. How can i write update statement with this or where i change..
Regards
Srikkanth.M

Hi,
review the syntax for the UNDATE statement. The following is okay:
UPDATE     dail
SET     timeout          = out_time
WHERE     attend_date     = x
AND     y          > z
;if all the columns (including x, y and z) are in dail.
If you need to get some of those values from another table, then you can do a scalar sub-query , that is, a query that returns 9at most) one row, enclosed in parentheses.
For example, if x is in another table (named r1), you might say:
UPDATE     dail     m
SET     timeout          = out_time
WHERE     attend_date     = (     -- Begin scalar sub-query
                    SELECT     MAX (bardate)
                    FROM     r1
                    WHERE     dail_id     = m.id
                 )     -- End scalar sub-query
AND     y          > z
;It looks like you're trying to do something similar.
I'm not sure exactly what x is supposed to be, and you're missing y (or z) as well as the operator between them.
MERGE is often easier to use than UPDATE, when you need to reference other tables.
If you'd like help, post a little sample data (CREATE TABLE and INSERT statements for all tables as they exist before the UPDATE) and the results you want from taht data (the contents of dail after the UPDATE).

Similar Messages

  • [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

    Hi,
    I am getting following error message ,
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
    When run this code.
    <%@ page import= "java.sql.*"%>
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    Statement st = con.createStatement();
    st.executeUpdate("update tscipshift set 11-Aug-08='M' where TechN='Elamparuthi'");
    %>
    tscipshift=table ,column=11-Aug-08 are all exist.
    I dont know why I am getting error mesage.
    Any idea why?

    Shahbaz2008 wrote:
    you haven't set your user name and password hereI don't believe that's necessary with Access. Then again, it's not an enterprise database.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    change it to this
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","+username+","+password+");
    here pass your username and password...
    In Oracle default user name and password is
    username = scott
    password = tigerSo who uses that? Only an eejit would leave that account open.
    So the statement would be
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","scott","tiger");
    or In Mirosoft Access there is no user name and password so the statement will be Like I said - unnecessary, and not the reason the OP is having problems.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","","");>
    Besides this change your table name 11-Aug-08 to anything that is not start with number or any special symbols.
    for example aug112008 is good or aug is too good.No, it's still not good if you understand ANYTHING about relational databases and normalization.
    I think it would work.I think you're just as stup!d as the OP.
    %

  • JDBC: Syntax error in UPDATE statement???

    Hi,
    I have been trying to solve this seemingly simple problem for the past 4 hours, and I had no success. I am working on a jdbc:odbc connection which utilizes MS Access. I have been constantly getting "Syntax error in UPDATE statement", and this is the statement
    (name of the table is CDs, columns are number, artist, album, label and date - all strings):
    query = "UPDATE CDs SET artist = '" + fields.artist.getText() +"', album = '" +
    fields.album.getText() + "', label = '" +
    fields.label.getText() + "', date = '" +
    fields.date.getText() + "' WHERE number = '" + fields.number.getText() + "'";
    Can anybody recognize an error? Thank you,
    mirkokrug

    A couple of possibilities.
    If the column NUMBER is numeric then it wouldn't need quotes around the data value. Also if the column DATE is a date or date/time type then the format from the textbox may not be correct.
    Col

  • 'Missing select' error for update statement using WITH clause

    Hi,
    I am getting the below error for update statement using WITH clause
    SQL Error: ORA-00928: missing SELECT keyword
      UPDATE A
      set A.col1 = 'val1'
         where
      A.col2 IN (
      WITH D AS
      SELECT col2 FROM
      (SELECT col2, MIN(datecol) col3 FROM DS
      WHERE <conditions>
        GROUP BY PATIENT) D2
      WHERE
      <conditions on A.col4 and D2.col3>

    Hi,
    The format of a query using WITH is:
    WITH  d  AS
        SELECT  ...  -- sub_query
    SELECT  ...   -- main query
    You don't have a main query.  The keyword FROM has to come immediately after the right ')' that ends the last WITH clause sub-query.
    That explains the problem based on what you posted.  I can't tell if the real problem is in the conditions that you didn't post.
    I hope this answers your question.
    If not, post a complete test script that people can run to re-create the problem and test their ideas.  Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • LOG ERRORS failing to capture 2291 errors on UPDATE statement

    We are running Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
    We have often successfully used the error logging clause when performing batch inserts to the database. However, we now have a situation where an UPDATE statement is failing and rolling back upon encountering a foreign-key referential constraint [ORA-02291]. It is successfully recording Check constraint errors [ORA-02290]. The foreign keys are not deferred, and they have nothing to do with any unique constraints or indices on the table that is the target of the UPDATE statement. The Error-logging table was created by using the DBMS_ERRLOG package. We recreated it to make sure that we had not introduced column format errors. The same problem occurs. The UPDATE statement is attempting to update approximately 12000 rows. Any help in understanding this problem would be appreciated.
    Here is the error statement
    ORA-02291: integrity constraint (OIFS.FRAME_FK07) violated - parent key not found
    Here is the problem statement and its surrounding PLSQL block:
    BEGIN <<update_records>>
    UPDATE frame f
    SET (company_name,
    address1_line,
    address2_line,
    address1_city,
    address1_state,
    address1_zip,
    contact1_name,
    contact1_phone_number,
    update_date,
    update_user,
    -- comments,
    facility_name,
    facility_type,
    doing_business_as,
    contact1_phone_ext,
    contact1_fax,
    contact1_email,
    contact2_name,
    contact2_phone_number,
    contact2_phone_ext,
    contact2_fax,
    contact2_email,
    source_survey,
    source_status,
    address2_city,
    address2_state,
    address2_zip,
    facility_location_number,
    attention_line,
    company_official,
    facility_irs_code
    ) =
    (SELECT company_name,
    address1_line,
    address2_line,
    address1_city,
    address1_state,
    address1_zip,
    contact1_name,
    contact1_phone_number,
    SYSDATE,
    user_in,
    facility_name,
    facility_type,
    doing_business_as,
    contact1_phone_ext,
    contact1_fax,
    contact1_email,
    contact2_name,
    contact2_phone_number,
    contact2_phone_ext,
    contact2_fax,
    contact2_email,
    source_survey,
    source_status,
    address2_city,
    address2_state,
    address2_zip,
    facility_location_number,
    attention_line,
    company_official,
    facility_irs_code
    FROM oifs.respondent r
    WHERE r.cin = f.cin
    WHERE f.cin IN
    (SELECT cin
    FROM
    (SELECT cin,
    company_name,
    address1_line,
    address2_line,
    address1_city,
    address1_state,
    address1_zip,
    contact1_name,
    contact1_phone_number,
    facility_name,
    facility_type,
    doing_business_as,
    contact1_phone_ext,
    contact1_fax,
    contact1_email,
    contact2_name,
    contact2_phone_number,
    contact2_phone_ext,
    contact2_fax,
    contact2_email,
    source_survey,
    source_status,
    address2_city,
    address2_state,
    address2_zip,
    facility_location_number,
    attention_line,
    company_official,
    facility_irs_code
    FROM oifs.respondent
    MINUS
    SELECT cin,
    company_name,
    address1_line,
    address2_line,
    address1_city,
    address1_state,
    address1_zip,
    contact1_name,
    contact1_phone_number,
    facility_name,
    facility_type,
    doing_business_as,
    contact1_phone_ext,
    contact1_fax,
    contact1_email,
    contact2_name,
    contact2_phone_number,
    contact2_phone_ext,
    contact2_fax,
    contact2_email,
    source_survey,
    source_status,
    address2_city,
    address2_state,
    address2_zip,
    facility_location_number,
    attention_line,
    company_official,
    facility_irs_code
    FROM oifs.frame
    LOG ERRORS INTO oifs.frame_load_errors
    (job_num || ' ' || TO_CHAR(SYSDATE, 'YYYYMMDD HH24:MI:SS') || ' update')
    REJECT LIMIT UNLIMITED;
    EXCEPTION
    WHEN OTHERS THEN
    ohub.err_pkg.record_and_continue(msg_in => 'problem in updating FRAME rows');
    RAISE;
    END update_records;

    Thank you for your help. It pointed me in the right direction, which was to temporarily disable the triggers. The ORA-02291 errors were then properly captured in the error-logging-table.
    The problem did not appear to be related to the trigger. The problem that was captured in my PLSQL error-handler but not the error-logging-table was an ORA-02291, which was specific to the original table. The trigger-driven processing did not seem to generate any errors (I have PLSQL error-handling logic in there as well).
    I was aware of Tom Kyte's statement, and I knew triggers were dicey when I decided to use them. It seemed the best way to try to ensure database integrity when regular Foreign-Key and Check constraints did not suffice. I am now paying the price for that decision.

  • Syntax Error in Update Statement

    Would a smart and kind CF pro mind putting a fresh pair of
    eyes on this code and tell me where the syntax error is? All the
    fields in the statement are numeric except the last one (comments).
    I have enclosed them in val() to ensure they are numeric when
    inserted into the DB. The fields they're being inserted into are
    numeric. I need to be numeric because I will be doing calculations
    on them. Also, I have triple-checked to ensure the datasource,
    table, and field names all match.
    Thanks,
    GwenH

    Try using <cfqueryparam>
    <cfquery datasource="reviews">
    UPDATE evals
    SET focus = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.focus#">
    , strengths = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.strengths#">
    , tailored = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.tailored#">
    , badinfo = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.badinfo#">
    , format = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.format#">
    , visual = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.visual#">
    , grammar = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.grammar#">
    , pronouns = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.pronouns#">
    , written = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.written#">
    , achieve = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.achieve#">
    , sell = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.sell#">
    , negative = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.negative#">
    , top = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.top#">
    , general = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.general#">
    , intro = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.intro#">
    , orientation = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.orientation#">
    , paragraphs = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.paragraphs#">
    , two = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.two#">
    , length = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.length#">
    , none = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.none#">
    , comments = <cfqueryparam cfsqltype="cf_sql_clob"
    value="#form.comments#">
    WHERE resumeID = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.resumeID#">
    </cfquery>
    Ken Ford
    Adobe Community Expert Dreamweaver/ColdFusion
    Adobe Certified Expert - Dreamweaver CS3
    Adobe Certified Expert - ColdFusion 8
    Fordwebs, LLC
    http://www.fordwebs.com
    "GwenH" <[email protected]> wrote in message
    news:[email protected]...
    > Would a smart and kind CF pro mind putting a fresh pair
    of eyes on this
    > code
    > and tell me where the syntax error is? All the fields in
    the statement are
    > numeric except the last one (comments). I have enclosed
    them in val() to
    > ensure
    > they are numeric when inserted into the DB. The fields
    they're being
    > inserted
    > into are numeric. I need to be numeric because I will be
    doing
    > calculations on
    > them. Also, I have triple-checked to ensure the
    datasource, table, and
    > field
    > names all match.
    >
    > Thanks,
    > GwenH
    >
    > <cfquery datasource="reviews">
    > UPDATE evals
    > SET
    > focus = val(#form.focus#)
    > , strengths = val(#form.strengths#)
    > , tailored = val(#form.tailored#)
    > , badinfo = val(#form.badinfo#)
    > , format = val(#form.format#)
    > , visual = val(#form.visual#)
    > , grammar = val(#form.grammar#)
    > , pronouns = val(#form.pronouns#)
    > , written = val(#form.written#)
    > , achieve = val(#form.achieve#)
    > , sell = val(#form.sell#)
    > , negative = val(#form.negative#)
    > , top = val(#form.top#)
    > , general = val(#form.general#)
    > , intro = val(#form.intro#)
    > , orientation = val(#form.orientation#)
    > , paragraphs = val(#form.paragraphs#)
    > , two = val(#form.two#)
    > , length = val(#form.length#)
    > , none = val(#form.none#)
    > , comments = '#form.comments#'
    > WHERE resumeID = #form.resumeID#
    > </cfquery>
    >

  • Error in UPDATE statement with SET and JOIN

    Hi
    UPDATE lms_assessment_student QS JOIN lms_assessment_student_ans QA ON QS.pk_Assessment_Stud_Id = QA.fk_Assessment_Stud_Id SET QA.Mark = 1, QA.Comment_Field = 1 WHERE QS.pk_Assessment_Stud_Id = 1 AND QA.Question_Id = 1;
    The above statement when executing is showing ORA-00971: missing SET keyword. so i changed it to
    UPDATE lms_assessment_student QS SET QA.Mark = 1, QA.Comment_Field = 1 WHERE QS.pk_Assessment_Stud_Id = 1 AND QA.Question_Id = 1 JOIN lms_assessment_student_ans QA ON QS.pk_Assessment_Stud_Id = QA.fk_Assessment_Stud_Id ;
    and it showing ORA-00933: SQL command not properly ended.So can anyone help me in solving this problem
    Thanking you in advance
    Dinny

    Hi ,
    So many errors
    YOUR QUERY :
    UPDATE lms_assessment_student QS SET QA.Mark = 1, QA.Comment_Field = 1 WHERE QS.pk_Assessment_Stud_Id = 1 AND QA.Question_Id = 1 JOIN lms_assessment_student_ans QA ON QS.pk_Assessment_Stud_Id = QA.fk_Assessment_Stud_Id ;
    and it showing ORA-00933: SQL command not properly ended.So can anyone help me in solving this problem
    first thing u want to update qa and u write update QS ??
    Second y do u want to join??? just put the condition
    SOLUTION
    UPDATE lms_assessment_student_ans
    SET lms_assessment_student_ans.Mark = 1,
    lms_assessment_student_ans.Comment_Field = 1
    WHERE lms_assessment_student.pk_Assessment_Stud_Id = 1
    AND lms_assessment_student.pk_Assessment_Stud_Id = QA.fk_Assessment_Stud_Id
    Hope it works for u..
    Bhavesh

  • DB13 - Update stats error

    Hello,
    In our BI 7.0 system, I received the following error in update stats log:
    BR0301E SQL error -1760 at location stats_tab_collect-16, SQL statement:
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/FZBBP_C03"', PARTNAME => '"/BIC/FZBBP_C030000003754"', ESTIMATE_PERCENT => 6, METHOD_OPT => 'FOR COLUMNS SIZE 150 "KEY_ZBBP_C03P" FOR COLUMNS SIZE 75 "KEY_ZBBP_C033","KEY_ZBBP_
    ORA-01760: illegal argument for function
    ORA-06512: at "SYS.DBMS_STATS", line 13437
    ORA-06512: at "SYS.DBMS_STATS", line 13457
    ORA-06512: at line 1
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/FZBBP_C03
    Kindly help resolve this error

    Hi Gautam,
    Can you please let us know what version of Oracle you are using, If you are on oracle 9 patchset8 (9.2.0.8), the syntax of the parameter METHOD_OPT  of the package DBMS_STATS was changed by Oracle and is now incompatible. This leads to the following error in the BRCONNECT statistics function.
    Pls check the below SAPnote and revert if its usefull to you.
    Note 1013000 - Corrections for ORA-06502 in DBMS_STATS in Oracle 9.2.0.8
    Also try to get the latest level of BRTOOLS and also if that doesnot work try to start the BRCONNECT using Cron Job/At Job, and not using DB13. You can use the SYSTEM Oracle user here with the corresponding password that has the necessary authorizations (DBA role).
    All the best !
    Edited by: prateek_y on Aug 10, 2010 10:21 PM

  • Problem in Update Statement

    I got some problem in update statement.Can anybody discuss with me regarding my problem? Below is the occured problem.
    //all the declaration like Connection, ResultSet are declared, setting the ODBC path and so on steps have been set up before this method. When compile it, no error, when I start to run my program, the program�s interface is shown, but the following error was appearred and data cannot be updated, can anybody tell me where is my mistake?
    //ERROR:SQL Error in update statement:java.sql.SQLException [Microsoft][ODBC][ODBC Microsoft Access Driver] Syntax Error in UPDATE statement.
    //emp_overview is the table name
    // last_name, first_name, office_phone�.is the attributes of the table
    //this method had declare in the interface class already
    public String updateData (String idd, String ln, String fn, String op,
                   String oe, String hp, String ps, String ss)
                   throws java.rmi.RemoteException
         {//begin of this method
              String result ="";
              try
              Statement statement = connection.createStatement();
              String sql = "UPDATE emp_overview SET" +
              "last_name=' "+ln+
              " ', first_name=' "+fn+
              " ', office_phone=' "+op+
              " ', office_ext=' "+oe+
              " ', home_phone=' "+hp+
              " ', primary_skill=' "+ps+
              " ', secondary_skill=' "+ss+
              " ' WHERE id="+idd;
              statement.executeUpdate(sql);
              statement.close();
              catch (java.sql.SQLException e)
         System.out.println("SQL Error in update statement: "+e);
              //throw a RemoteException with the exception
              //embedded for the client to receive
         throw new java.rmi.RemoteException("Error in Updating exist row into DB", e);
              return result;
         }//end of this method

    Hi Kevin,
    According to the code you have posted, it looks like you are missing a space between "SET" and "last_name". I suggest you add the following line of code:
    System.out.println(sql);
    before the invocation of "executeUpdate()".
    I also suggest you add the following line of code:
    e.printStackTrace();in your "catch" block.
    Hope this helps.
    Good Luck,
    Avi.

  • Error in this  statement

    This statement return an SQLException which says:
    Syntax error in INSERT INTO statement
    String mySql_1 = " INSERT INTO MEAL(MEAL_AMT_LOADED)"
    "WHERE MEAL.STU_NUM = '" jtfStNo.getText().trim()
    "'VALUES('"+jtfAmLd.getText().trim()+"')";
    I want the following query statement to allow me to insert a meal amount of a particular student through jtfAmLd into the MEAL table whereby a student must be identified by a student number also to be provided in jtfStNo.
    I'll be glad if you can help me with this statement
    Cool.

    I want to know how am i going to update the second table MEAL which
    contains a foreign key STU_NUM which referenced STUDENT the table which contains STU_NUM as a primary key using the criteria of a STU_NUM.
    Duffymo and DrClap i have tried UPDATE as follows:
    String query = "UPDATE STUDENT,MEAL"+
    "SET MEAL.MEAL_AMT_LOADED = '" + jtfAmLd.getText().trim() +"',"+
    "MEAL.MEAL_REL_MADE = '"+jtfRM.getText().trim()+ "' "+
    "WHERE STUDENT.STU_NUM = MEAL.STU_NUM"+
    "AND STUDENT.STU_NUM = '" + jtfStNo.getText().trim() + "'";
    But it returns an error which says:
    Failed to insertjava.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

  • Problem with CFQUERY update statement

    I'm having trouble getting an SQL Update statement to work
    correctly and I'm scratching my head as to why.
    The output i get is the following:
    Syntax error in UPDATE statement
    SQLSTATE 42000
    SQL UPDATE companies SET CompanyName = 'Insight Data Ltd',
    Address1 = '5 Boulevard', Address2 = '', Address3 = '', City =
    'Weston-super-Mare', County = 'North Somerset', Postcode =
    'BS231NN', OfficeBranch = 'BR', contacttitle1 = 'Mr', contactname1
    = 'Andrew', contactsurname1 = 'Scott', contactposition1 = 'Owner',
    mail1 = 'yes', TelNumber = '01934 123456', TPS = 'no', FaxNumber =
    '',FPS = 'no',MobileNumber = '',MPS = 'no',email =
    '[email protected]', EPS = 'no', WebAddress = '
    http://www.insightdata.co.uk',
    contacttitle2 = 'Mr', contactname2 = 'David', contactsurname2 =
    'Lewis', contactposition2 = 'Office Manager', mail2 = 'no',
    contacttitle3 = 'Mr', contactname3 = '', contactsurname3 = '',
    contactposition3 = 'Owner', mail3 = 'no', contacttitle4 = 'Mr',
    contactname4 = '', contactsurname4 = '', contactposition4 =
    'Owner', mail4 = 'no', wPVCUfab = 'yes', wALUinst = 'yes', WHERE
    companyid = 33415
    VENDORERRORCODE -3503
    DATASOURCE idv6
    I've checked that all the data fields are in the correct
    format, and I can't see why I am getting a syntax error. Any help
    on this would be appriciated

    Agreed, but it looks like you already have the sql. Take the
    query from the error message above and run it in your database.
    Though I did notice have an extra comma between the last column and
    there WHERE clause.
    wALUinst = 'yes' , WHERE companyid = 33415
    For the optional columns, put the commas first to prevent
    errors due to trailing or too many commas
    UPDATE Table
    SET Column1 = 'value'
    <cfif SomeValueExists>, Column2 = 'other value'
    </cfif>
    WHERE ID = 123
    Two other things to consider: use cfqueryparam and consider
    normalizing your table. Column names like Contact1, Contact2,
    Contact3 ... are usually a sign its time to normalize.

  • Update statement wrong??

    if(str1.equals("Update"))
                   try
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                       Connection c = DriverManager.getConnection("jdbc:odbc:Student");
                       Statement st = c.createStatement();
                       PreparedStatement ps  = c.prepareStatement("Update Directory set(Name,Class,Shift,Progress,Address,City,Country,PhoneNo,eaddress) = (?,?,?,?,?,?,?,?,?) where Id = "+ id.getText());
                             ps.setString(1,name.getText());
                             ps.setString(2,class1.getText());
                             ps.setString(3,shift.getText());
                             ps.setString(4,progress.getText());
                             ps.setString(5,add.getText());
                             ps.setString(6,city.getText());
                             ps.setString(7,country.getText());
                             ps.setString(8,phno.getText());
                             ps.setString(9,eadd.getText());
                        ps.executeUpdate();
                        jp.showMessageDialog(this,"Record Deleted Successfully","SUCCESS",jp.INFORMATION_MESSAGE);
                        c.close();
                        st.close();
                   catch(ClassNotFoundException cnf)
                        System.out.println("Cnf Exception");
                   catch(SQLException sql)
                        jp.showMessageDialog(this,sql,"EXCEPTION",jp.ERROR_MESSAGE);
              }I got an error message saying synatax error in update statement..but i cant find anything that is wrong with it..any idea

    Try this:
    "Update Directory set Name=?,Class=?,Shift=?,Progress=?,Address=?,City=?,Country=?,PhoneNo=?,eaddress=? where Id = ?"
    ps.setString(1,name.getText());
    ps.setString(2,class1.getText());
    ps.setString(3,shift.getText());
    ps.setString(4,progress.getText());
    ps.setString(5,add.getText());
    ps.setString(6,city.getText());
    ps.setString(7,country.getText());
    ps.setString(8,phno.getText());
    ps.setString(9,eadd.getText());
    ps.setString(10,id..getText());

  • Error in updating OBNK Table ( Bank Statements and Reconciliations,Manual)

    PLease advise ,
    Bank Statements and Reconciliations,Manual Reconciliation
    Client is receiving the following message:
    Error in updating OBNK Table
    Edited by: Philip Eller on May 20, 2008 9:03 AM

    Hi Darpal Thiarha,
    Please kindly refer to note 1132591 and note 1128677 to see if these are relevant to this issue. Upgrading to  2007A PL15 or above may avoid such issues relevant with the error 'Error in updating OBNK Table'.
    Regards,
    Candice Ren
    SAP Business One Forums Team

  • Error while schedulingg update stat in db13

    Dear Experts,
    Please look into my issue we are facing an error while scheduling update statistics in db13 and I tried to open detailed log
    It is given
    SXPG_COMMAND_EXECUTE failed for BRTOOLS - Reason: program_start_error: For More Information, See SYS
    Please help me how to solve this my error
    Regards

    Hi,
    Check the owner for BRBACKUP, BRARCHIVE, and BRCONNECT in kernel,
    these files should be with SIDADM, if not change the owner to SIDADM and rerun the update stats.
    and also Refer the note 446172
    Regards,
    Ram

  • Error while running batch update statement

    Hi
    We are experiencing the below error while running the batch update statement where in the IN clause have more than 80,000 entries. The IN clause is already handled for max 1000 values so it has multiple or clause
    like update...where id in (1,2...999) OR id in (1000,1001........) OR Id in ()...
    Error at Command Line:1 Column:0
    Error report:
    SQL Error: ORA-00603: ORACLE server session terminated by fatal error
    ORA-00600: internal error code, arguments: [kghfrh:ds], [0x2A9C5ABF50], [], [], [], [], [], []
    ORA-00600: internal error code, arguments: [kkoitbp-corruption], [], [], [], [], [], [], []
    00603. 00000 - "ORACLE server session terminated by fatal error"
    *Cause: An ORACLE server session is in an unrecoverable state.
    *Action: Login to ORACLE again so a new server session will be created
    Is there a limitation of oracle or some bug?
    Thanks

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/limits003.htm
    The limit on how long a SQL statement can be depends on many factors, including database configuration, disk space, and memoryI think you're over this limit.
    The only way is creating a temporary table with all the values and using
    IN (select ...)Max
    http://oracleitalia.wordpress.com

Maybe you are looking for