Error executing SQL statement

Hi,
Can anyone see why I am getting this error message for my SQL query?
WITH SKU_DATA AS (
SELECT /*+ MATERIALIZE */ DISTINCT FROM_LOC_ID,
           SKU_ID,
           DESCRIPTION,
           UPDATE_QTY,
        ORDER_ID,
        CONSIGNMENT,
           WEIGHT,
        PALLET_ID,
        CASE 
    WHEN Upd_Qty_Ratio < 1
    THEN TO_CHAR(UPDATE_QTY) || 'U'
    WHEN TRUNC(Upd_Qty_Ratio) = Upd_Qty_Ratio
    THEN TO_CHAR(Upd_Qty_Ratio) || 'C'
    ELSE TO_CHAR(TRUNC(UPDATE_QTY)) || 'C' || ' ' || TO_CHAR(ROUND(MOD(Upd_Qty_Ratio, 1) *  USER_DEF_NUM_3, 6)) || 'U'
    END CU_Sum
    FROM (
  SELECT DISTINCT
         FROM_LOC_ID,
      S.SKU_ID,
         S.DESCRIPTION,
         ITL.UPDATE_QTY,
         S.USER_DEF_NUM_3,
      OH.ORDER_ID,
      ITL.CONSIGNMENT,
      ITL.PALLET_ID,
         NVL(ITL.UPDATE_QTY,0)*NVL(S.EACH_WEIGHT,0) Weight,
         ITL.UPDATE_QTY/(CASE S.USER_DEF_NUM_3 WHEN 0 THEN 1 ELSE S.USER_DEF_NUM_3 END) Upd_Qty_Ratio
    FROM INVENTORY_TRANSACTION ITL, SKU S, LOCATION L, ORDER_HEADER OH
    WHERE ITL.SKU_ID = S.SKU_ID
    AND ITL.CODE = 'Pick'
    AND ITL.CONSIGNMENT = $P{Consignment}
    AND OH.ORDER_DATE = TO_CHAR($P{Date}, 'DD-Mon-YYYY')
    AND OH.ORDER_ID = ITL.REFERENCE_ID
    AND ITL.TO_LOC_ID = 'CONTAINER'))
SELECT DISTINCT ORDER_ID, CONSIGNMENT, WEIGHT, PALLET_ID, CU_Sum,
(SELECT NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'U') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'C',NULL) END)),'0') ||'C' || ' ' || NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'C') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'U',NULL) END)),'0') ||'U' FROM SKU_DATA) AS Total_Cu_Sum
FROM SKU_DATAThanks in advance.
SM.

Hi Sean,
It is saying error executing SQL statement, but with no "ORA error" so maybe its a Jasper Reports error i'm not too sure.
And this is a different version of the one we done together, that one is running fine just having problems putting the jasper file on to the server. I'm just using the main bits from the original SQL.
SM

Similar Messages

  • [0098]SQL*Plus encountered oracle error 100 while executing SQL Statement

    Hi,
    i'm trying to delete duplicate records from a table and running following script. this script is triggered from a unix script. it successfully deletes the records but in the last throws following error message,
    :[0098]SQL*Plus encountered oracle error 100 while executing SQL Statement:2:Investigation required:
    can anybody please help? below is the script.
    DECLARE
    --CURSOR FOR DUPLICATE ROWS
    CURSOR CUR_DUPLICATE_ROWS IS
    Select RMS_NOTE_ID, RMS_SUMMARY_NOTE_ID, count(*) cnt from PARTY_NOTE
    group by RMS_NOTE_ID,RMS_SUMMARY_NOTE_ID having count(*) > 1;
    var_date PARTY_NOTE.PARTY_NOTE_CREATED_DATE%TYPE;
    BEGIN
    FOR DUPLICATE_ROWS_REC IN CUR_DUPLICATE_ROWS
    LOOP
    delete from party_note
    where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID
    and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID
    and rowid not in (select max(rowid) from party_note
    where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID);
    commit;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    ROLLBACK;
    END;

    Try this:
    delete party_note
    where  rowid not in (select max(rowid)
                         from   party_note
                         group  by rms_note_id, rms_summary_note_id
    commit;No need for cursors and loops.
    And when that's completed, consider ALTERing the table to add a unique index (or even a primary key) so you'll never need to do this again.

  • What can be the cause of Web ADI error : Cannot execute SQL statement?

    I created a custom integrator in r12.2.3 and while loading I encountered an error, Cannot execute SQL statement.
    I checked my setup in Interface attribute , the RUN_ID column has a default type SQL QUERY with a default value SELECT  XXCONV_EAM_ASSET_NUM_S.NEXTVAL FROM DUAL.
    If I have a right setup here, what can be the cause of this error?

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • SQL Error 58004. Executed SQL Statement

    Hi experts, we working with SAP-MAM 3.0 database DB2E Version 9.1.2 ,  when I try install the MAM30 show me this message.
    Please, Can i reinstall the DB2E application for fix this error, or there are other solution?
      u2022 Excepción al tratar el métodoSMARTSYNC : com.sap.ip.me.spi.persist.IPersistenceException: char processor: SQL Error 58004. Executed SQL statement: [INSERT INTO M8_PROPERTIES("KEY","VALUE") values ('KEY_INCONSISTENT_DATA','X')] : char processor: SQL Error 58004. Executed SQL statement: [INSERT INTO M8_PROPERTIES("KEY","VALUE") values ('KEY_INCONSISTENT_DATA','X')]
    u2022 java.lang.RuntimeException: SQLState:58004, error code:-1 : SQLState:58004, error code:-1
    u2022

    Moved thread to DB6 forum.

  • The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Hello All,
    I am getting below error can you please help me
    Error:-
    The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Perhaps this thread will help you out
    http://stackoverflow.com/questions/11453066/error-the-transaction-associated-with-the-current-connection-has-completed-but
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/ZREVISQTY

    Dear Guys,
                    Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
    Manythanks
    Arun

    Dear Guys,
                    Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
    Manythanks
    Arun

  • Error in SQL Statement: SAPSQL_INVALID_TABLENAME

    Hello all,
    While displaying contents of infocube i am getting strange error ..
    Error in SQL Statement: SAPSQL_INVALID_TABLENAME ABC
    Message no. DBMAN256
    ( Table name length is 16 )
    I am able to see the contents of Fact table.
    Could not found any solution till now.. Any lights , views will be very much helpful.
    Regards
    Nimesh

    hi Nimesh,
    check oss note 835816
    Symptom
    When you execute a query, a data-mart, SEM, APO or similar access, an SQL error 4004 occurs "Unknown table name" Open SQL: Short dump with UNCAUGHT_EXCEPTION CX_RSR_X_MESSAGE in the ABAP Call Stack, you find the RSDRC_BASIC_DB_QUERY_DATA_GET function module.
    Prior to this, relatively large datasets (more than 10%) were deleted from the InfoCube.
    Other terms
    Business Information Warehouse, Factview, DBMAN256, DBMAN
    256, SAPLRSDRS, DELETE, DELETE_FACTS, RSDRD_DELETE_FACTS
    Reason and Prerequisites
    During the purge, the fact tables are rebuilt again as of a certain percentage, for performance reasons. The factview is then not created again.
    Solution
    Views that are already missing can be compiled again with the SAP_FACTVIEWS_RECREATE report.
    The correction prevents the problem reappearing.
    BW 3.0B
               Import Support Package 27 for 3.0B (BW3.0B Patch27 or SAPKW30B27) into your BW system. The Support Package is available whennote 0723258 with the short text "SAPBWNews BW3.0B Support Package 27", which describes this Support Package in more detail, is released for customers.
    BW 3.10 Content
               Import Support Package 21 for 3.10 (BW3.10 Patch21 or SAPKW31021) into your BW system. The Support Package is available whennote 0723263 with the short text "SAPBWNews BW3.1 Content Support Package 21", which describes this Support Package in more detail, is released for customers.
    BW 3.50
               Import Support Package 13 for 3.5 (BW3.50 Patch13 or SAPKW35013) into your BW system. The Support Package is available when note 0765114 with the short text "SAPBWNews BW Support Package 13 NetWeaver'04  Stack 13", which describes this Support Package in more detail, is released for customers.
    In urgent cases you can use the correction instructions.
    These notes may already be available before the Support Package is released, to make information available in advance. However, the short text then still contains the words "preliminary version".

  • SAP BW 3.5 "Error in SQL Statement: DBIF_RSQL_INVALID_RSQL" in Infospoke

    Hi ,
    I am working on SAP BW 3.5.
    while downloading the records through infospoke and giving them to the Application server side, I am getting an error  "Error in SQL Statement: DBIF_RSQL_INVALID_RSQL".
    Daily the Infospoke runs on delta mode. But for downloading of few records i have deactivated the delta and changed it in to Full mode. After downloading the data I again Activated the delta.but while Executing on Background mode I am getting an error mentioned above.
    can anyone please suggest a solution for resolving this error?
    Thanks in advance.
    Santosh.

    Hi:
    Did you do some recent change in the objects?. I face sometimes this error and it is due to misalignment among the objects in a data flow (cubes, DSOs, transformations, DTPs, etc.).
    What you can do is activate everything again.
    Best regards.

  • Error in SQL Statement: SAPSQL_INVALID_TABLENAME /BI0/V0FIGL_C01F

    Hi,
    When I am executing datasource 80FIGL_C01 using T.code RSA3 in BW3.5, getting error Error in SQL Statement: SAPSQL_INVALID_TABLENAME /BI0/V0FIGL_C01F
    I am getting same error when pulling data from BW3.5 to BI7.0 at scheduling.
    Can I have your valuable insights on this.
    Thanks in advance!
    Sapna

    Hi,
    Try the report sap_factviews_recreate. Warning: the program generate the views for all infocubes. When you don't want to do this, debug the abap and delete the infocubes from the table G_T_CUBE.
    Or activate the infocube and re-generate the datasource.
    Sven

  • RMAN-10006: error running SQL statement: alter session set remote_dependenc

    Backups are failing with following error
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-12001: could not open channel default
    RMAN-10008: could not create channel context
    RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
    RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
    Not able to change to signature
    SQL> alter session set remote_dependencies_mode=signature;
    ERROR:
    ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
    be from among MANUAL, AUTO
    I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
    Parameter type
    String
    Syntax
    REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
    Default value
    TIMESTAMP
    Parameter class
    Dynamic: ALTER SESSION, ALTER SYSTEM
    =======================================
    I believe it could be because of following bug
    "A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
    Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
    I appreciate your effort in fixing this issue.
    Edited by: user10610722 on Nov 25, 2008 4:37 PM

    Hi:
    It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe).

  • Report -Error in SQL Statement

    Hi to All,
    Whe I ran the report on ODS its giving the following error.
    Error Error in SQL Statement:DBIF_RSQL_INVALID-RSQL
    Error Error When generating the SQL statement
    Error reading the data of Infoprovider ZABCXX
    Abort system error in Program SAPLRRK0 and form RSRDR;SRRK0F30-01
    Note:ZABCXX is a Multiprovider
    Then I identified data type  is mismatched for 4 characteristics in ODS , I have changed the data type from Date to Char then deleted the data from ODS and reloaded the six Init packages with different selections.
    After reloading I ran the report still same error its showing.
    Is any bug in stadard program?
    Pls can anyody throw some light on my problem.
    Thanks,
    Sha.

    Hi,
    Try using transaction code ListCube and see if you are able to see some entries in BW system itself.
    Also in RSRT -> Query -> Environment -> Delete old abaps
    Also in RSRT -> Query -> Environment -> Generate Queries
    And let us know the outoput .
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

  • SQL error, Error in SQL statement

    hi all,
    in our project we are using 0SD_C03. while  i creating aggrigates it's showining "SQL error" and Error in SQL statement.
    please provide me some inputs.
    sasidhar

    check:
    Aggregate issue
    Problems with BITMAPINDEX under ORACLE in BW
    SAP Note Number: 159779
    No 'Star Transformation' for a Hierarchy Changerun
    SAP Note Number: 934281

  • Error in SQL Statement (ODS data loading Error)

    Hello Gurus...
    I am trying to loading the data Info Source To ODS in my ODS Key Figure Z_IVQUA (Invoice Quantity)
    is getting the Error Message Data shows 0 from 0 Records.
    I was Remove the Key Field from ODS Then try to load the data but i am getting same Error..
    Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/Z_INVQUA
    Errors in source system
    Please Suggest....
    Thanks
    Prakash

    Hello All...
    Really appreciate if you can give me some advise. Thanks.
    Prakash
    Edited by: Prakash M on Jan 14, 2009 2:14 PM

  • How to export the result from executing sql statement to excel file ?

    HI all,
    Great with Oracle SQL Developer, but I have have a trouble as follwing :
    I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
    anyone can help me to do that ? Thanks so much
    Sigmasvn

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • How could I extract past executed SQL statement from dictionary ?

    We use oracle11gR2 on win2008R2.
    How could I extract the past executed SQL statement from dictionary ? (Is it possible from V$SQLTEXT or other dictionary table ?)

    IvicaArsov wrote:
    Hi,
    You can find executed SQL in V$SQLAREA view (if it's still in memory). If it does'n't exist and you have AWR enabled you can query DBA_HIST_SQLTEXT table, but remember that the statistic information in AWR tables is filtered (1 out of 10).
    I.Arsov
    As you know when taking snapshot oracle will capture only top sql statements and stored in AWR.
    But can you please link(source) dba_hist_sqltext contain only 1 out of 10 filtered data?. In dba_hist_active_sess_history yes it contain 1 out of 10 sampled data.

Maybe you are looking for