Jdoql sql error.. puzzled why it puts quotes in table name

I keep getting a jdoql error when running my entity bean.. basically, something is wrong with the sql command the entity bean passes to the database.. when i set the log file to "fine" and looked at the log file, this is the sql statement it passes to the driver:
SQL statement<select t0."id", t0."parent_category", t0."name", t0."available", t0."available_date" from "drs_category" t0 where t0."genotype" = ?> with input values:
I noticed that it put quotes between the table name!!! this will always give me a syntax error if i run this quote straight into the informix database.. the problem is, where do i tell it to take out the quotes since it's programmed into the jdoql class... btw, i am using an informix database

nevermind... i figured it out.. create file INFORMIX DYNAMIC SERVER.properties and put in appserv-cmp.jar ..add these lines to the file:
# default properties for Informix SQL generation
FOR_UPDATE=for update
LEFT_JOIN=, outer
RIGHT_JOIN=,
RIGHT_JOIN_PRE=outer
IS_NULL=\= NULL
IS_NOT_NULL=!= NULL
RTRIM=trim (trailing \" \" from
RTRIM_POST=)
QUOTE_CHAR_START=
QUOTE_CHAR_END=

Similar Messages

  • SQL error in the database when accessing a table.

    Hi,
    I got below error at production server. Please suggest how to reslove this error.
    <br>
    <br>
    <br>
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    <br>
    Exception              CX_SY_OPEN_SQL_DB
    <br>
    Date and Time          02.01.2011 15:55:06
    <br>
    <br>
    <br>
    <br>
    <br>
    Short text
    <br>
    SQL error in the database when accessing a table.
    <br>
    <br>
    <br>
    How to correct the error
    <br>
    Database error text........: "[10054] TCP Provider: An existing connection was
    <br>
    forcibly closed by the remote host.
    <br>
    [10054] Communication link failure"
    <br>
    Internal call code.........: "[RSQL/INSR/SWFCNTBUF ]"
    <br>
    Please check the entries in the system log (Transaction SM21).
    <br>
    <br>
    If the error occures in a non-modified SAP program, you may be able to
    <br>
    find an interim solution in an SAP Note.
    <br>
    If you have access to SAP Notes, carry out a search with the following
    <br>
    keywords:
    <br>
    <br>
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    <br>
    "CL_SWF_CNT_FACTORY_SHMEM======CP" or "CL_SWF_CNT_FACTORY_SHMEM======CM001"
    <br>
    |    "ADD_INSTANCE"         
    <br>
    <br>
    <br>
    Information on where terminated
    <br>
    Termination occurred in the ABAP program "CL_SWF_CNT_FACTORY_SHMEM======CP" -
    <br>
    in "ADD_INSTANCE".
    <br>
    The main program was "SAPMSSY1 ".
    <br>
    <br>
    In the source code you have the termination point in line 16
    <br>
    of the (Include) program "CL_SWF_CNT_FACTORY_SHMEM======CM001".
    <br>
    The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
    <br>
    procedure "ADD_INSTANCE" "(METHOD)", but it was neither handled locally nor
    <br>
    declared
    <br>
    in the RAISING clause of its signature.
    <br>
    <br>
    The procedure is in program "CL_SWF_CNT_FACTORY_SHMEM======CP "; its source
    <br>
    code begins in line
    <br>
    1 of the (Include program "CL_SWF_CNT_FACTORY_SHMEM======CM001 ".
    <br>
    <br>
    <br>
    <br>
    Source Code Extract
    <br>
    <br>
    Line
    SourceCde
    <br>
    <br>
    1
    METHOD add_instance .
    <br>
    2
    <br>
    3
    data: ls_id type swfcntbuf.
    <br>
    4
    <br>
    5
    check buffer method - store in local buffer if necessary
    <br>
    6
    retcode = cl_swf_cnt_factory=>add_instance( ibf_por = ibf_por instance = instance ).
    <br>
    7
    <br>
    8
    CHECK m_buffer_method EQ mc_buffer_shared.
    <br>
    9
    <br>
    10
    append key to list of tasks to add stored in database table SWFCNTBUF
    <br>
    11
    will be evaluated by build process for shared memory area (UPDATE_BUFFER method)
    <br>
    12
    <br>
    13
    ls_id-mandt = sy-mandt.
    <br>
    14
    ls_id-id    = ibf_por.
    <br>
    15
    <br>
    >>>>>
    INSERT swfcntbuf CONNECTION r/3*wfcontainer
    <br>
    17
    FROM ls_id.
    <br>
    18
    <br>
    19
    IF sy-subrc EQ 0.
    <br>
    20
    Commit seems to be necessary always, even if INSERT has failed, to get rid of
    <br>
    21
    database locks
    <br>
    22
    COMMIT CONNECTION r/3*wfcontainer.
    <br>
    23
    ENDIF.
    <br>
    24
    <br>
    25
    ENDMETHOD.
    <br>

    duplicate here SQL error in the database when accessing a table.
    Do not post the same question in more than on forum.

  • DBIF_RSQL_SQL_ERROR with SQL error in the database when accessing a table.

    dear all,
      i have done a system copy from production server into quality server. quality was scrapped and freshly installed with SAP then used the DB flush method to carry out the system copy. i had to change the DBS_ORA_SCHEMA in environment variables to SAP<SOURCE SID> from SAPSR3. the sap version is ECC6.0,DB is ORACLE10.2 on WIN NT.
      after MMC opened, i get "SQL error in the database when accessing a table" error is coming. in SM21, I am getting "Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000 )
    Database error 8103 at SEL access to table TBTCO
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    Database error 8103 at FET access to table TBTCP
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    > Short dump "081018 130339 sibqty_Q TY_00 " generated
    Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
    > Short dump "081018 130339 sibqty_Q TY_00 " generated
    Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
    Delete session 001 after error 023
    Database error 8103 at DEL access to table TMSALOGAR
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    > Short dump "081018 130432 sibqty_Q TY_00 " generated
    Database error 8103 at FET access to table SNAP
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    > Short dump "081018 130432 sibqty_Q TY_00 " generated
    Transaction Canceled SY 002 ( SQL error in the database when accessing a table. )
    Database error 8103 at FET access to table TSP02"
    please find the st22 DUMP:
    ow to correct the error                                                                          |
    Database error text........: "ORA-08103: object no longer exists"
    Internal call code.........: "[RSQL/READ/TBTCO ]"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "SAPMSSY2" or "SAPMSSY2"
    "INITIATE_JOB_START"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "INITIATE_JOB_START" "(FORM)", or its possible occurrence must be declared in
    the
    RAISING clause of the procedure.
    |   
    please do me this favor if you know to avoid this problem..
    thanks a lot..

    Hello Anuj,
    This is because the COUNT(*) is returning a value which is longer than the INT4 data type it is expecting. If you restrict the selection by introducing a WHERE clause, then you won't get the dump:
    DATA: dyn_from    TYPE string,
          dyn_where   TYPE string,
          gx_sql_err  TYPE REF TO cx_sy_open_sql_error,
          gv_text     TYPE string.
    dyn_from  = `DD01L INNER JOIN DD02L ON DD02L~AS4LOCAL = DD01L~AS4LOCAL AND DD02L~AS4VERS = DD01L~AS4VERS`.
    dyn_where = `DOMNAME LIKE 'Z%'`.
    TRY .
        SELECT COUNT(*) FROM (dyn_from) WHERE (dyn_where).
        WRITE: / sy-dbcnt NO-GROUPING.
      CATCH:  cx_sy_open_sql_db             INTO gx_sql_err,
              cx_sy_dynamic_osql_semantics  INTO gx_sql_err,
              cx_sy_dynamic_osql_syntax     INTO gx_sql_err.
    ENDTRY.
    IF gx_sql_err IS BOUND.
      gv_text = gx_sql_err->get_text( ).
      WRITE: / gv_text.
    ENDIF.
    BR,
    Suhas

  • Loading issue : Error: sql error in the database while accessing a table

    Hello,
    where as one of the DTP in the process chain failed due to  *Error: sql error in the database while accessing a table*, where as in the short dump it showing as Transaction log of data base is full., but i checked the data base space in DB02, more space is available . once we run the same DTP by manually its successful. its not through  any errors.
    could u please help me out solve the problem.
    Thanks
    siva kumar.

    it might be a lock. do you drop index before loading?
    the database might be full at the moment of loading and not later if many loadings happen at the same time on the same system...
    when you then rerun your dtp manually, it can go through as it's perhaps the only one running at that moment...
    you can try to set the btch parameter to 1...this will help in some cases.
    M.

  • DBIF_RSQL_SQL_ERROR: SQL error in the database when accessing a table

    Hi Gurus,
    Im getting DBIF_RSQL_SQL_ERROR: SQL error in the database when accessing a table error while I was importing support pack in the system. This is ERP 6.0 with EHP4 with MS SQL in back ground and I was applying the BASIS SP 04. It was in the TEST scenario and in the SPDD_SPAU_CHECK phase it threw the error.
    Short text
        SQL error in the database when accessing a table.
    What can you do?
        Note which actions and input led to the error.
        For further help in handling the problem, contact your SAP administrator
        You can use the ABAP dump analysis transaction ST22 to view and manage
        termination messages, in particular for long term reference.
    How to correct the error
        Database error text........: "[601] Could not continue scan with NOLOCK due to
         data movement."
        Internal call code.........: "[RSQL/FTCH/E071 ]"
        Please check the entries in the system log (Transaction SM21).
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
        "SAPLSVRT" or "LSVRTU01"
        "TR_LAST_IMPORT_OF_OBJECT"
    SPAM  is ending with the above short dump. I have checked the space availability and it is OK.
    Kindly help.
    Renju Aravind.

    Hi,
    this error is very often seen in case of a database corruptions. Please follow note 142731 and perform a complete database check. Send the results when they show errors.
    Best regards
      Clas

  • Getting error "SQL error in the database when accessing a table."

    Hi All,
    We are getting Dump Error SQL error in the database when accessing a table for the batch job EISSD/REQUISITION 14 / which includes program AQ20FD==========A2============. Please reply. The Dump error details are as follows
    Short text
        SQL error in the database when accessing a table.
    How to correct the error
        Database error text........: "ORA-01555: snapshot too old: rollback segment
         number 21 with name "_SYSSMU21$" too small"
        Internal call code.........: "[RSQL/FTCH/VBRK ]"
        Please check the entries in the system log (Transaction SM21).
    Thanks
    Padmakar Kudtarkar
    Edited by: Rob Burbank on May 19, 2011 9:38 AM

    The query where we are getting error in Standard program AQ20FD==========A2============ for Job
    EISSD/REQUISITION 14 / is as follows:
    select VBRKBUKRS VBRKFKART VBRKFKDAT VBRKFKTYP VBRKGJAHR VBRKKUNAG VBRKKUNRG VBRKKURRF VBRKVBELN VBRKWAERK VBRP~AUBEL
           VBRPAUPOS VBRPFKIMG VBRPKVGR2 VBRPKZWI1 VBRPMATNR VBRPMWSBP VBRPNETWR VBRPPSTYV VBRPVBELN VBRPVGBEL VBRP~VGPOS
           VBRPVKBUR VBRPVKGRP VBRPVRKME VBRPWAVWR
    into (VBRK-BUKRS , VBRK-FKART , VBRK-FKDAT , VBRK-FKTYP , VBRK-GJAHR , VBRK-KUNAG , VBRK-KUNRG , VBRK-KURRF , VBRK-VBELN
         , VBRK-WAERK , VBRP-AUBEL , VBRP-AUPOS , VBRP-FKIMG , VBRP-KVGR2 , VBRP-KZWI1 , VBRP-MATNR , VBRP-MWSBP , VBRP-NETWR
         , VBRP-PSTYV , VBRP-VBELN , VBRP-VGBEL , VBRP-VGPOS , VBRP-VKBUR , VBRP-VKGRP , VBRP-VRKME , VBRP-WAVWR )
    from ( VBRK
           inner join VBRP
           on VBRPVBELN = VBRKVBELN )
           where VBRK~BUKRS in SP$00004
             and VBRK~FKDAT in SP$00001
             and VBRK~KUNAG in SP$00002
             and VBRK~VBELN in SP$00006
             and VBRP~MATNR in SP$00003.
      %dbacc = %dbacc - 1.
      if %dbacc = 0.
        stop.
      endif.
      check SP$00004.
      check SP$00001.
      check SP$00002.
      check SP$00006.
      check SP$00003.
      add 1 to %count-VBRK.
      %linr-VBRK = '01'.
      extract %fg01.
      %ext-VBRP01 = 'X'.
        extract %fgwrVBRP01.
    endselect.

  • Root cause of "SQL error in the database when accessing a table. "

    Dear experts,
    I meet this dump "SQL error in the database when accessing a table" when executing a sql.
    Sql:
        SELECT sesssessno poscrm_serplan_id poscrm_ser_h_id poscrm_ser_i_id
               possolution_id sessbundle_id sessdbid sessinstno pos~crm_ordered_prod
               sessdbid sessinstno
          INTO CORRESPONDING FIELDS OF TABLE et_sess_list
          FROM dsvassessadmin AS sess JOIN service_posn_sm AS pos
            ON possession_id     = sesssessno
          FOR ALL ENTRIES IN lt_contractno
          WHERE sess~contractno = lt_contractno-contract_no
           AND sess~status IN lt_status_range
           AND bundle_id IN lt_bundle_id
           AND pos~solution_id GT 0
    This sql works well in dev system SD7, however, it causes dump in another dev system "SMV".
    Can anyone give me any ideas?
    Thanks

    Hi Jovito,
    This is info from ST22
    Short text
        SQL error in the database when accessing a table.
    What can you do?
        Note which actions and input led to the error.
        For further help in handling the problem, contact your SAP administrator
        You can use the ABAP dump analysis transaction ST22 to view and manage
        termination messages, in particular for long term reference.
    How to correct the error
        Database error text........: "SQL0101N The statement is too long or too
         complex. SQLSTATE=54001"    Internal call code.........: "[RSQL/OPEN/DSVASSESSADMIN ]"
        Please check the entries in the system log (Transaction SM21).
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
        "CL_AGS_SERVICE_SERV===========CP" or "CL_AGS_SERVICE_SERV===========CM018"
        "GET_OVS_SESSION_LIST"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
        4. Details about the conditions under which the error occurred or which
        actions and input led to the error.
        The exception must either be prevented, caught within proedure
        "GET_OVS_SESSION_LIST" "(METHOD)", or its possible occurrence must be declared
         in the
        RAISING clause of the procedure.
        To prevent the exception, note the following:
    It seems that after translation the native sql is too long. But I think this can be solved.

  • Inbound-Queue SYSFAIL: SQL error in the database when accessing a table

    Hi,
    we send around 80 IDoc simultaneously, there 15 are stuck.
    They all have SYSFAIL in SMQ2 with message: SQL error in the database when accessing a table
    I already unlocked the queues and try to resend. Nothing happend!
    I ran RSQIWKEX for the single queus but now there are new queues in Status SYSFAIL.
    I already checked some entries in forum and blogs, but nothing worked out yet!
    Can someone help?! it's urgent!!
    br

    Hi, well as mentioned i searched and found this already.
    But in ST22 i got error concerning
    Laufzeitfehler         DBIF_RSQL_SQL_ERROR
    Ausnahme               CX_SY_OPEN_SQL_DB
    So i guess it's something more serious.
    Any more ideas?!
    Can i simply delete the stucked queues and reporcess them?!
    br

  • PL/SQL cursor question (possible to pass in the table name?)

    I want to pass the name of a table to a cursor and select from that,
    Is this possible in PL/SQL?
    CURSOR get_rows(table_name IN VARCHAR2) IS
    SELECT * FROM table_name;
         The actual sql statement that will be used is more complex.
         I have 18 tables for which the same query would work varrying only in the name of the table.
    I get an error when I try to do the above.

    >
    I am not quite sure how you can derive anything from the design given the example that has all other details stripped out
    >
    What Justin said is pretty clear
    >
    If you are really doing a SELECT * and you have 18 different tables, it seems unlikely that all tables would always have exactly the same set of columns. If they do, that is almost certainly an indication that the data model is incorrect.
    >
    A data model that includes 18 tables with the same set of columns has something wrong with it. You explained that by clarifying that it is only TWO columns in each of the 18 tables that is the same. Perhaps the tables have one-to-many relationships and the two columns are the key columns. That is different.
    >
    The 'select *' will actually pull back only two columns, both of which are primary keys (long). I need to select all rows into a data structure that is global that I can iterate through at a later time. So given that I can use a ref cursor and have a dynamic table name, how would I select into a data structure that is of two primary keys and make that global to be used in another method at a later time?
    >
    Why not use an actual table to store the column data? An index-organized table would be perfect for that use and won't use up valuable user memory.
    And by global do you mean the data needs to be accessible by a different session than the one that collected the data?
    And what do you mean by 'later'? Tomorrow or next week?
    The use case you describe sounds like you are having to update primary key values in tables that have parent-child foreign key constraints. Is that what you are doing? Can you do this offline and defer or disable the constraints, perform an update (rather than insert/delete) and then reenable the constraints?

  • MSI K72N Delta LSR - windows XP keeps stop codes and serious errors Puzzled why

    hi,
       System specs
    AMD sempron 2400
    512mb DDR PC3200 ( 2 x 256nb Matrix module brand memory written on chips )
    MSI K7N2 Delta LSR ( lastest Bios )
    Onboard sound - Enabled
    Onboard lan - Disabled
    Liteon DVD Rom
    CD-RW 52x
    ATI Radeon 9550 ( installed at moment )
    before was a Nvidia FX5700 LE took back faulty as tried radeon 9800 pro and was ok for a couple hours
    got Nvidia FX 5500 - faulty fan making noise on boot.
    Ive built a System up and its been running fine for a few months and then 1 day system crashed and got windows recovered from serious error and and wound't shut down but only restart.
    Replaced memory that was in and checked with mem99 and said it was faults so replaced memory and shutdown problem vanished.
    Few days later windows xp started saying recovered from serious error again with stop codes
    0x0000050
    Bccode 10000050
    Bccode 1000008e
    Bccode 1000000a
    Stop Code D1
    They was the stop codes been getting since, some said Page_fault_in_nonpaged_area, IRQL_not_less or Equal
    Im puzzled what the problem can be know, even tried reformatting and reinstalling windows twice and not solved it, tried a another cdrom drive and still same.
    Im puzzled what the problem can be.

    Temps are fine running about 45'c in windows and max about 52'c when in full load ive got motherboard monitor on all time monitering temps and also recording and save out log file when turned off for temps.
    Its a retail boxed AMD Sempron which i dont think much to the stock heatsink and fan ( Athlon 64bit ones are loads better copper base and heat compound instead of sticky pad )
    The new memory is only think is got whats wrote on the memory modules is called Matrix, I know from past experience's when u reinstall windows and files cant copy across ok and keeps saying cant read file etc or cant copy file during installation thats indication bad memory strip, ive even got a memory thats fault ( i only use for testing and diagnostic ) as 1 of the memory modules comes up fault in memtest96 and even tried that and still same, thats how i found out in first place memory was causing system not to shutdown properly.
    What i can try is my memory as ive got 1.5gig in Elixir branded and i know thats ok 100% with nforce 2 boards as i had a MSI K7N2 Delta ILSR and ran elixir memory with np, before i got a Gigabyte KT880 board.
    Antivirus ive got running on system at the moment is AVG and always used it all time, it dont use any cpu usage and also saved my system loads from virus as it caught them as they tried to run and stop them, something norton's dont seem to do very well.
    I give modem a try on a USB hub but its strange when u unplug USB its ok and NTL recommends when modem stops working to unplug power from back modem and leave it a while and it comes back on, done this in past successfully but this time its blue screening, Which could be part of windows main files are corrupted. The USB Modem is running of its own PSU so shound't be using USB power at all, if it was that explain blue screen when taking power off as it do it when taking usb out.
    Error codes ive watched a Microsoft web broadcast ( over a hour long ) about error codes and 40% of them are software + hardware related combined they make it sound so easy to diagnose them but in reality unless u know windows 100% its hard to.
    Harddrive seems to copy files ok across and back, i have to try another Harddrive and see but from past experiences when Harddrives are about to fail windows seems to stall, lockup and also just stop responding when accessing certain programs or files.
    Its a confusing 1 as u solve 1 piece of puzzle another comes up and throws u off track again.
    Looking that all parts ive replaced so far have solved 1 or another problem to only reveal another hidden, PC's who have them lol
    If i solve it i post my finding np it keep me busy for a couple days testing things, u learn something new every day with pc's new faults and problems and how to solve them, try too lol
    And most of time its compatibility problems but odd times hardware or software.

  • SQL Statement error - ORA-00903: invalid table name

    Hi
    I have written a sql script that gets executed from a form within e-business suite. Unfortunately, the script is falling over with an error:
    unknown command beginning "MERGE INTO..." - rest of line ignored.
    unknown command beginning "USING edop..." - rest of line ignored.
    unknown command beginning "ON (elw.ro..." - rest of line ignored.
    unknown command beginning "WHEN MATCH..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
          SET ELW.billed_flag          = t.billed_flag,
    ERROR at line 2:
    ORA-00903: invalid table name the actual statement that is causing the issue is:
    MERGE INTO edopaif.table1 elw
    USING edopaif.tablw2 t
    ON (elw.rowid = t.LOAD_WORKING_ROWID)
    WHEN MATCHED THEN
       UPDATE
          SET ELW.billed_flag          = t.billed_flag,
              ELW.last_bill_generated   = t.last_bill_generated,
              ELW.last_bill_type        = t.last_bill_type,
              ELW.load_month            = t.load_month,
              ELW.BILL_TRANSACTION_ID   = t.bill_transaction_id
    WHEN NOT MATCHED THEN
       INSERT(error_meaning)
       VALUES('ROWID error with ins_ptia');The version of e-business suite that we are using is: 11.5.10.2.
    The version of the Oracle database that we are using is:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE 9.2.0.6.0 Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    Please note that I am able to successfully run the statement directly connected as the APPS schema in the database - the error only occurs when the script is run from the forms front-end (which is really confusing me).
    Many thanks
    Paul

    Hi
    I've modified the script to include only the statement that is erroring and it still errors when executed from the front end application.
    Next I re-wrote the statement to use PL/SQL instead of the MERGE statement, to do the update, and the script completes succesfully, i.e.:
    DECLARE
       CURSOR cu_lw IS
             SELECT t.billed_flag,
                    t.last_bill_generated,
                    t.last_bill_type,
                    t.load_month,
                    t.bill_transaction_id,
                    t.load_working_rowid
               FROM table2 t;
    BEGIN
       FOR rec_cu_lw IN cu_lw LOOP
          UPDATE table1 elw
             SET ELW.billed_flag           = rec_cu_lw.billed_flag,
              ELW.last_bill_generated      = rec_cu_lw.last_bill_generated,
              ELW.last_bill_type           = rec_cu_lw.last_bill_type,
              ELW.load_month               = rec_cu_lw.load_month,
              ELW.BILL_TRANSACTION_ID      = rec_cu_lw.bill_transaction_id
          WHERE elw.rowid                  = rec_cu_lw.load_working_rowid;
       END LOOP;
    END;
    /I am still unsure as to why the MERGE statement is failing when executed in the front end, but completes in the backend with no issues at all. Obviously I would prefer to use the MERGE statement instead of PL/SQL to do the update.
    Thanks
    Paul

  • Abt sql error?.

    Hai gurus,
                         Iam working in the production server of the client system.while loading i got the error only records of  (4339 out of 50000) are transfered.in error message it is showing that
    Data has not been updated in PSA Table . The request is probably still running or there was a short dump.
    data packet one arrived in b.w;processing :data packet not yet processed.
    In trfc is showing that arfc state = system fail,
    SQL error in the database when accessing a table.please tell me what is short dump?.why it occurs?.it would be helpful to me if any solve this issue..
    regards,
    sri

    Dear Srinivas
    This may belongs to when any table locked OR data base down time when particulaly accessing that table, OR might be some data base incosistency.
    Regards
    Raju Saravanan

  • SQL error while CIF

    Hi ,
    I am getting following error while CIFing from R/3 to APO "SQL error in the database when accessing a table" what will be the issue?
    Regards
    Rajesh

    Hi Rajesh,
    Activate the Queue block entries in /SAPAPO/CQ and this will clear the block.
    Regards
    Rishi

  • Invalid table name when pass in the table name as variable in dynamic sql

    Hi,
    I need to create a stored procedure which will return a list of data to my java application like the following.
    first, select the table name from the first table.
    For example : SELECT T_NAME FROM MDR_SMSTABLES
    second, select the data from the table which returned by first select statement
    For example : SELECT * FROM T_NAME.
    I use dynamic sql with cursor to select the data. But it returns "java.sql.SQLException: ORA-00903: invalid table name"
    I fetch the table name to varchar2. I think this might the cause it returns me the this error. But i don't know what type should i put for the table name other then varchar2.
    val2 VARCHAR2(200);
    OPEN cv FOR
    SELECT T_NAME FROM MDR_SMSTABLES WHERE T_DATE=d_dt_sent;
    FETCH cv INTO val2;
    WHILE cv%FOUND
    LOOP
    OPEN refcur FOR
    'SELECT * FROM :t WHERE MID = :m' USING val2, msg_id;
    EXIT WHEN refcur IS NOT NULL;
    FETCH cv INTO val2;
    END LOOP;
    As my stored procedure is quite long, so i just paste some of the code here. Hope the information is enough. Can anyone please help?
    Thanks

    DECLARE
    val2 VARCHAR2 (200);
    cv sys_refcursor;
    refcur sys_refcursor;
    BEGIN
    OPEN cv FOR
    SELECT table_name
    FROM user_tables
    WHERE table_name IN ('EMP', 'DEPT');
    FETCH cv INTO val2;
    WHILE cv%FOUND
    LOOP
    OPEN refcur FOR 'SELECT * FROM '||val2;
    EXIT WHEN refcur IS NOT NULL;
    FETCH cv INTO val2;
    END LOOP;
    END;

  • Problem quoting table names

    Hi,
    I want to use my tables capitalized, but something is not working right. I am using Oracle Database Express Edition 2.1.0.00.39.
    Creating and altering a table as follows works:
    "CREATE TABLE Mitarbeiter (
         MA_ID number NOT NULL,
         ORG_ID number NOT NULL,
         Nachname char(128) NOT NULL,
         Vorname char(128) NOT NULL,
         Geburtsdatum date NOT NULL,
         Kommentar varchar2(100),
         Rang char(3) DEFAULT 'MA' NOT NULL,
         PRIMARY KEY ( MA_ID )
    ALTER TABLE Mitarbeiter ADD CONSTRAINT OrgEinheit FOREIGN KEY ( ORG_ID ) REFERENCES OrgEinheit ( ORG_ID );
    If I quote the table name like
    "CREATE TABLE "Mitarbeiter" (
         MA_ID number NOT NULL,
         ORG_ID number NOT NULL,
         Nachname char(128) NOT NULL,
         Vorname char(128) NOT NULL,
         Geburtsdatum date NOT NULL,
         Kommentar varchar2(100),
         Rang char(3) DEFAULT 'MA' NOT NULL,
         PRIMARY KEY ( MA_ID )
    ALTER TABLE "Mitarbeiter" ADD CONSTRAINT OrgEinheit FOREIGN KEY ( ORG_ID ) REFERENCES OrgEinheit ( ORG_ID );
    the alter statement is not executed successfully. I get the error message "ORA-00942 table or view does not exist".
    Who can help?
    Udo

    Thanks,
    I am not planning to have more headaches,
    everything's fine now. Sorry asking about a selfmade
    problem quoting only part of the table names.
    UdoNo need to apologise, it's a common thing that people don't understand how the database stores object names in UPPER by default and how double quotes (often seen used in SQL generated by 3rd party tools) actually force the case of the names.
    The below example shows how easily confusion could be caused if you start using double quotes...
    SQL> create table mytable (x number);
    Table created.
    SQL> create table "mytable" (x number);
    Table created.
    SQL> create table "MyTable" (x number);
    Table created.
    SQL> select table_name from user_tables where upper(table_name) = 'MYTABLE';
    TABLE_NAME
    MYTABLE
    MyTable
    mytable
    SQL> insert into mytable values (1);
    1 row created.
    SQL> insert into "mytable" values (2);
    1 row created.
    SQL> insert into "MyTable" values (3);
    1 row created.
    SQL> select * from mytable;
             X
             1
    SQL> select * from "mytable";
             X
             2
    SQL> select * from "MyTable";
             X
             3
    SQL>

Maybe you are looking for