Weird problem when executing an update statement

Please help me out with this issue. This a very weird problem i'm facing while executing the following update statement.
update tblo.S_TABLE c
SET (ACCNT_NAME, ACCNT_LOC)
=
(select NAME, LOC from S_TABLE1 p
where p.ROW_ID = c.ACCNT_ID)
where ROW_ID = 'XXXXX'
The statement executes perfectly fine in "SQL Plus" but when i try from my application or any SQL Tool that uses ODBC, it fails with the following error
<eb1>ORA-00923: FROM keyword not found where expected
State:S1000,Native:923,Origin:[Oracle][ODBC][Ora]</eb1>
ODBC Driver Used: 9.2.0.2.0

Yes this could most probably be resolved by upgrading the driver. I'hv tried MS Oracle ODBC driver but that is even more problematic!
The applications works fine in another environment which uses a Merant ODBC driver. Thanks for your time and advice.

Similar Messages

  • Can getGeneratedKeys() be used when executing batches of statements?

    Hi all,
    this question was posted in this thread:
    Can getGeneratedKeys() be used when executing batches of statements?
    but unfortunately I didn't find the answered appropriate.
    That thread is now locked, so I would like to start it again here.
    This is a summary of the other thread:
    Can you retrieve keys generated by a batch of insert statements? The following code produces an ArrayIndexOutOfBoundsException from the Oracle T4CNumberAccessor.unmarshalOneRow() method (see stack trace at the bottom of this message).
    The code is:
    String sql = "INSERT INTO FOO (ID, NAME) VALUES (FOO_SEQ.NEXTVAL, ?)";
    String generatedColumns[] = {"ID"};
    PreparedStatement pstmt = connection.prepareStatement(sql, generatedColumns);
    pstmt.setString(1, "A");
    pstmt.addBatch();
    pstmt.setString(1, "B");
    pstmt.addBatch();
    pstmt.setString(1, "C");
    pstmt.addBatch();
    //EXCEPTION OCCURS HERE
    pstmt.executeBatch();
    The exception is:
    java.lang.ArrayIndexOutOfBoundsException: 22
    at oracle.jdbc.driver.T4CNumberAccessor.unmarshalOneRow(T4CNumberAccessor.java:190)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:610)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10580)
    The only answer given was:
    "You should directly specify how big your batching is. For that reason you may use ExecutionContext where you can set setBatchingLimit(int) and setBatching(bool). This operation will tell execution context the size of supposed batching and also should be batching performed at all or not. You can add batching jobs but you can not execute the jobs without proper initialization of batching job size - it will fail with out of bounds."
    ExecutionContext is not something I found in jdbc drivers, so I'm a bit confused about this answer.
    Did anyone solve the problem?
    Thanks,
    Michele

    >
    We have the same problem. No solution so far.
    >
    I never found a definitive solution but testing seems to show that this is not possible.
    There is no code that can be written to get the generated keys if batching is used.
    This is because the 'getGeneratedKeys' method must be called on the prepared statement and would return the generated keys as a ResultSet object. But when batching there is only one prepared statement but multple sets of parameters, one for each batch entry.
    Thus there could only be one call to 'getGeneratedKeys' since there is only one prepared statement. This strongly implies that it is not possible to use 'getGeneratedKeys' when batching.
    See Retrieval of Auto-Generated Keys in the JDBC Dev guide
    http://docs.oracle.com/cd/B19306_01/java.102/b14355/jdbcvers.htm#CHDEGDHJ

  • I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can

    I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can this is all new to me.

    Read this: iOS 4: Updating your device to iOS 5 or later
    ... oh I think it is a 3gs or a 3
    This makes a difference. What does it say in Settings > General > About?

  • I have a problem when ı want to update and restore my ipad for ios5 : an error occurred while restoring this ipad (-10), what can i do??

    i have a problem when ı want to update and restore my ipad for ios5 : an error occurred while restoring this ipad (-10), what can i do??

    Error -1 is not mentioned in this article about error messages during a restore process: http://support.apple.com/kb/TS3694
    This one comes close:
    The device could not be restored. An internal error occurred, or Error 3200: This indicates a network-connectivity or traffic issue. If you see this error, wait an hour or more and try again.
    You may also check your security software settings, to make sure that iTunes can contact Apple servers during this process: iTunes for Windows: Troubleshooting security software issues

  • Expdp problem when executing from pl/sql transportable tablespaces

    Hello
    i have a very strange problem for which your assistance is really appreciated. i am applying the transportable tablespaces approach and i have a problem when executing expdp from commandline in comparison to the procedure generated to make the exact same thing.
    more precisely when running:
    expdp etl/etl dumpfile=TBSP090609_DMP.dmp logfile=TBSP090609_DMP.log directory=EXPDP transport_tablespaces=TBSP090609 transport_full_check=y
    the dmp file produced is over 200MB.
    when runng the below pl/sql code the volume produced is around 50MB. any idea what i am missing?
    job_handle :=
    dbms_datapump.OPEN (operation => 'EXPORT',
    job_mode => 'TRANSPORTABLE',
    job_name => 'export_tablespace',
    VERSION => 'COMPATIBLE'
    dbms_datapump.add_file (handle => job_handle,
    filename => dump_file_name,
    DIRECTORY => export_dir_name
    dbms_datapump.set_parameter (handle => job_handle,
    NAME => 'TTS_FULL_CHECK',
    VALUE => 1
    dbms_datapump.metadata_filter (handle => job_handle,
    NAME => 'TABLESPACE_LIST',
    VALUE => '('''
    || tablespace_name
    || ''')'
    dbms_datapump.start_job (job_handle);

    thanx you for your response. the problem was eventually managed to be resolved as follows:
    job_handle :=
    dbms_datapump.OPEN (operation => 'EXPORT',
    job_mode => 'TRANSPORTABLE',
    job_name => 'export_tablespace',
    VERSION => 'COMPATIBLE'
    dbms_datapump.add_file (handle => job_handle,
    filename => dump_file_name,
    DIRECTORY => export_dir_name
    dbms_datapump.set_parameter (handle => job_handle,
    NAME => 'TTS_FULL_CHECK',
    VALUE => 1
    dbms_datapump.metadata_filter (handle => job_handle,
    NAME => 'TABLESPACE_EXPR',
    VALUE => 'IN('''
    || tablespace_name
    || ''')');
    dbms_datapump.start_job (job_handle);

  • I am having problem when i am updating my iphone 4 to ios 5 ..it get update n took 50 minutes then at the end when it was processing file ...suddenly an error comes that an unknown error accurred {9006}..please help me..how will i update my iphone 4

    i am having problem when i am updating my iphone 4 to ios 5 ..it get update n took 50 minutes then at the end when it was processing file ...suddenly an error comes that an unknown error accurred {9006}..please help me..how will i update my iphone 4

    Error 9006: Following Troubleshooting security software frequently resolves this error. There may be third-party software installed that modifies your default packet size in Windows by inserting a TcpWindowSize entry into your Registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet size modification for assistance.

  • Problems when trying to update the free version of Adobe Reader Updater 11.0.00 on Windows 8. There

    Problems when trying to update the free version of Adobe Reader Updater 11.0.00 on Windows 8. There is something to fix.??

    Have you tried http://ardownload.adobe.com/pub/adobe/reader/win/11.x/11.0.03/misc/AdbeRdrUpd11003.msp ?

  • HT4623 my iphon 4s got problem when i was updating it and screen become black and there is a usb & itone icon on it it dose not work any more ..any feedback about this guys?

    my iphon 4s got problem when i was updating it and screen become black and there is a usb & itone icon on it it dose not work any more ..any feedback about this guys?

    Connect it to iTunes and restore it.

  • Menu bar problem when executing reports

    We have a problem when executing the reports either from se38 or through transaction.
    The standard menu bar is not appearing and in its place we are getting ?????????????  ?????????????????
    also the icons that are appearing in app tool bar are not showing anything.
    Whats the reason for this?

    hi,
    It is not for one single report iam talking about,any report that is executed from se38 or transaction .
    In selection screen of report we are getting ???????????????
    ?????????????? in menu bar instead of normal options like program edit goto utilities.................
    does any one know the reason for this?
    This issue we are facing today only.
    Edited by: Gautham chakraverthi on Oct 31, 2008 3:06 PM

  • Problem with a sqlite update statement using variables

    Flash Builder/Flex 4
    I'm trying to create a routine that will allow me to change the name of an author in a sqlite table.
    I have this update statement which works with hardcoded data:
    //trace("updateName function newAuthorName: " + newAuthorName (returns Dusty));
    //trace("updateName function oldAuthorName: " + oldAuthorName (returns Kristin));
    updateStmt = new SQLStatement();
    updateStmt.sqlConnection = conn;
    var sql:String = "UPDATE tableName SET authorNameColumn = 'Dusty' WHERE authorNameColumn = 'Kristin' ";
    updateStmt.text = sql;
    updateStmt.execute();
    If I change the statement to
    "UPDATE tableName SET authorNameColumn  =" +  newAuthorName +  "WHERE authorNameColumn =" + oldAuthorName;
    I get SELECT error: SQLError: 'Error #3115: SQL Error.', details:'near 'authorNameColumn': syntax error'
    I've tried changing many things about this statement trying to isolate the problem, but it seems to not like the variables.

    Lee;
    Thanks for your help.
    I'm relatively new to this Flex stuff.
    I've been trying to fix this problem for hours and you know how it is when you keep looking at the same thing for too long.
    The article you linked to helped. I finally just copied the text from it and changed the variable name to my own.
    FINALLY!! I can go do something else now.
    Grins
    Kristin

  • Unable to execute an update statement using CallableStatement

    Hi there,
    I'm trying to run an update statement from JUnit using java.sql.CallableStatement and oracle.jbo.server.DBTransaction.
            String updateSql =
                "update footable set barcol=TO_DATE('12-SEP-09','dd-MM-yy') where bazcol = 505";
            try {
                statement =
                        applnModule.getDBTransaction().createCallableStatement(updateSql,
                                                                               2);
                int executeUpdate = statement.executeUpdate();
                AppsLogger.write(this,
                                 "# records UPDATED ------------------>" + executeUpdate,
                                 AppsLogger.SEVERE);
            } catch (SQLException s) {
                s.printStackTrace();
                Assert.fail("Encountered SQL Exception: " + s);
            } finally {
                try {
                    if (statement != null)
                        statement.close();
                } catch (SQLException s) {
            }Below is the exception I get when I run the above code. There is no problem with the SQL - it works fine from SQLDeveloper.
    java.lang.AssertionError: Encountered SQL Exception: java.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected
         org.junit.Assert.fail(Assert.java:91)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66)
         org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
         org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
         org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:94)
         org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
         org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
         oracle.apps.common.applicationsTestFramework.junit.internal.AtfJUnit4JTestCaseClassRunner.invokeTestMethod(AtfJUnit4JTestCaseClassRunner.java:362)
         oracle.apps.common.applicationsTestFramework.junit.internal.AtfJUnit4JTestCaseClassRunner.runMethods(AtfJUnit4JTestCaseClassRunner.java:272)
         oracle.apps.common.applicationsTestFramework.junit.internal.AtfJUnit4JTestCaseClassRunner$1.run(AtfJUnit4JTestCaseClassRunner.java:265)
         org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
         org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
         oracle.apps.common.applicationsTestFramework.junit.internal.AtfJUnit4JTestCaseClassRunner.run(AtfJUnit4JTestCaseClassRunner.java:262)Edited by: 911023 on Oct 2, 2012 11:28 AM
    Edited by: 911023 on Oct 2, 2012 11:30 AM

    Using case statement.
    UPDATE gor_gold_post
       SET hoov_flag = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 304
                                   OR
                                   (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END,
           b49n      = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 121.6
                             OR
                             (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END
    WHERE tariff_code IN (169, 135, 136);Note: Code not tested.

  • OWB trying to create merge when should be update statement

    Hi there
    Have a problem whereby when set target update type of table to update, OWB trying to create a merge and failing with message merge sttament cannot be generated because column <column_name> is used for both matching and update.
    A matching column cannot be updated in a merge statement.
    We are trying to only update certain rows in a target table.
    What is the best way to do this in a mapping in normal sql we
    would do
    update table
    set cola = 12, col b=14
    where cola = 10
    Many Thanks

    Hi there
    Thanks for this. I get your idea of doing filter on target at start.
    However in our situation I'm not certain how to achieve what we require, being new to OWB.
    We have a source staging table with various tranasctions (updates, inserts and deletes all flagged with a timestamp. We need to process these as follows:
    1) Inserts become inserts on the target table
    2) Deletes become updates on target table, expiration date set to timestamp of record on source table. Here we need to limit the update to only update open record thus not changing history for the code concerned. Open record identified as expiration date set to '31/12/4000'
    3) Updates become Updates, setting expiration date on current record to timestamp of staging table record, again only updating currently open record which is identified by expiration date set to '31/12/4000'.
    What I thought of doing would be mapping
    starting with target table going into a filter to get open records '31/12/4000'. This with joiner operator to staging table and the results of joiner to target table load type set to update. This would handle deletes and the update part of updates.
    However this wouldn't take care of the inserts and the second part of updates, i.e. the requirement to insert new record to cater for the update.
    Thought about two mappings, one with target type of update as above and another for inserts, but problem would be need to process all records in staging table in right order, e.g in one day could have insert then update. Couldn't run insert mapping first as update mapping would then run and close off the inserted record.
    Basically looking for advice on best way to achieve the above.
    Many Thanks

  • Performance Problem when executing the report for the first time.

    Hi,
    We have a Zreport...to improve the performance i created Index on few Data Base table..before my changes it used to take more than 15 minutes after the changes it taking less than 1 min for the same variant and for other variants also.
    But when executing the first in morning its taking the same time more than 15 min.Please let me know how to increase the performance when executing first time also,
    Thanks,
    Kiran.

    Hi all,
    Appreciate your valuable replies...
    @ Thomas: i do accept with your solution running a background job..but user is not accepting for it..thanks for your reply.
    @Siegfried Boes  : for testing purpose Im running this manytimes..but for user they may
    require when ever they need to know open oders.the volume of the data is barongs 300-350 at
    max.
    @Brad Bohn  : After creating the index the repose time reduced to half ...i hope  i have
    created a right index.
    Observation here...I executed the report in production system more than 5 times it took the
    same time, my changes are still in quality..so i think may be for selecting the right index
    its taking this much time.and for the next time is taking right index n doing it so it taking
    less.
    Do you accept it?.if so Please let me know how to explicitly say the select statement to
    use my index.
    Thanks,
    kiran.

  • Weird problem when downloading the output to an excel sheet

    Hi to all,
          when i download the list, output by an alv grid, i observe a weird problem..in the excel sheet the last digit (10th digit) of the first col. which is delivery no., is getting truncated...0001802563 is getting downloaded as 000180256..couldn't understand why...when i use conversion_exit fm, the values are not getting truncated and downloading correctly...curious to know what's gone wrong in this funcationality? thanks all
    cheers,
    Shankar. M.

    actually the problem is in the field catalog.if u can send me the code, i shall bug fix it for u.

  • Problem When executing chart in the Web

    Hi all,
    I am getting the following error when executing a chart in the Web.
    Diagnosis
    Internal error when communictaing with the IGS (charts).
    System response Internal error text: "Error opening an RFC connection."
    Procedure
    Procedure for System Administration
      Notification Number RSWWW 005 
    Thanks.

    Hi,
    this looks like your IGS has crashed and somehow needs to be restarted. I also assume that the IGS patchlevel is old in comparison to the newest version in the Service Marketplace.
    Please update the IGS (which includes a restart) or ask your basis team to upgrade the IGS.
    FYI: Note <a href="http://service.sap.com/sap/support/notes/931900">931900</a> describes how to discover the IGS patchlevel even when it is not running.
    Regards
    Matthias

Maybe you are looking for