ORA-00904 in Merge statement

I encountered with ORA-00904 in Merge statement. I fixed the error but I don't know why. Would you please help me explain it? Thanks in advance. The following is the detail description of my question.
I have two tables TBL_A<col1 integer,col2 integer> TBL_B<col1 integer,col2 integer> and an anonymous block to test executed in Oracle 10gR2.
DECLARE
V_NUM INTEGER;
BEGIN
V_NUM := 1;
/*merge I it's okay.the function of merge seems meaningless, please pay attention to its grammar*/
MERGE INTO TBL_A A
USING (SELECT V_NUM N, COL1, COL2 FROM TBL_B) B
ON (A.COL1 = B.N)
WHEN MATCHED THEN
UPDATE SET A.COL2 = B.COL2;
/*merge II*/
/*ora-00904*/
MERGE INTO TBL_A A
USING (SELECT V_NUM, COL1, COL2 FROM TBL_B) B
ON (A.COL1 = V_NUM)
WHEN MATCHED THEN
UPDATE
SET A.COL2 = B.COL2;
/*merge III is okay*/
MERGE INTO TBL_A A
USING (SELECT COL1, COL2 FROM TBL_B) B
ON (A.COL1 = V_NUM)
WHEN MATCHED THEN
UPDATE
SET A.COL2 = B.COL2;
COMMIT;
END;
I traced the 904 error and it seems the point is in the binding of variable V_NUM. But I don't know the exact reason. I think maybe it relates with the parse of PL/SQL. Would someone please help me or give me some hints?

hi,
When you saye,
   MERGE INTO TBL_A A
    USING (SELECT V_NUM,
                  COL1,
                  COL2
             FROM TBL_B) B
       ON (A.COL1 = V_NUM)
   WHEN MATCHED
   THEN
      UPDATE SET A.COL2 = B.COL2;
In the above for ON (A.COL1 = V_NUM)
oracle treats v_num as a variable in the procedure rather than v_num returned from using clause.
So you need to alias that.
MERGE INTO TBL_A A
    USING (SELECT V_NUM as somecol,
                  COL1,
                  COL2
             FROM TBL_B) B
       ON (A.COL1 = b.somecol)
   WHEN MATCHED
   THEN
      UPDATE SET A.COL2 = B.COL2;Edited by: Ganesh Srivatsav on May 12, 2011 11:42 AM
Added alias after peter pointed out for variable in the using.

Similar Messages

  • ORA 22813 in merge statement

    hi gems..good afternoon...
    My database version is 11.2.0.1.0 64 bit Solaris OS.
    I am facing an "ORA-22813: operand value exceeds system limits" while running a procedure.
    I have used loggers and found that it is getting failed in a MERGE statement.
    That merge statement is used to merge a table with a collection. the code is like below:
    MERGE /*+ INDEX(P BALANCE_HISTORIC_INDEX) */
        INTO BALANCE_HOLD_HISTORIC P
        USING TABLE(GET_BALANCE_HIST(V_MERGE_REC)) M
        ON (P.CUSTOMER_ID = M.CUSTOMER_ID AND P.BOOK_ID = M.BOOK_ID AND P.PRODUCT_ID = M.PRODUCT_ID AND P.SUB_BOOK_ID = M.SUB_BOOK_ID AND)
        WHEN MATCHED THEN
          UPDATE
             <set .....>
        WHEN NOT MATCHED THEN
          INSERT<.....>The parameter of the function GET_BALANCE_HIST(V_MERGE_REC) is a table type.
    Now the function GET_BALANCE_HIST(V_MERGE_REC) is a pipelined function and we have used that because the collection V_MERGE_REC may get huge with data.
    This proc was running fine from the beginning but from day before yesterday it was continously throwing ORA 22813 error in that line.
    please help..thanks in advance..

    hi paul..thanks for your reply...
    the function GET_BALANCE_HIST is not selecting data from any tables.
    What this pipeline function is doing is, it is taking the huge collection V_MERGE_REC as parameter and releasing its datas in pipelined form. The code for the functions is :
    CREATE OR REPLACE FUNCTION GET_BALANCE_HIST(P_MERGE IN TAB_TYPE_BALANCE_HISTORIC)
      RETURN TAB_TYPE_BALANCE_HISTORIC
      PIPELINED AS
      V_MERGE TAB_TYPE_BALANCE_HISTORIC := TAB_TYPE_BALANCE_HISTORIC();
    BEGIN
      FOR I IN 1 .. P_MERGE.COUNT LOOP
        V_MERGE.EXTEND;
        V_MERGE(V_MERGE.LAST) := OBJ_TYPE_BALANCE_HISTORIC(P_MERGE(I).CUSTOMER_ID,
                                                 P_MERGE(I).BOOK_ID,
                                                 P_MERGE(I).PRODUCT_ID,
                                                 P_MERGE(I).SUB_BOOK_ID,
                                                 P_MERGE(I).EARNINGS,
                                                 P_MERGE(I).EARNINGS_HOUSE,
                                                 P_MERGE(I).QUANTITY,
                                                 P_MERGE(I).ACCOUNT_INTEGER);
      END LOOP;
      FOR J IN 1 .. V_MERGE.COUNT LOOP
        PIPE ROW(OBJ_TYPE_BALANCE_HISTORIC(V_MERGE(I).CUSTOMER_ID,
                                                 V_MERGE(I).BOOK_ID,
                                                 V_MERGE(I).PRODUCT_ID,
                                                 V_MERGE(I).SUB_BOOK_ID,
                                                 V_MERGE(I).EARNINGS,
                                                 V_MERGE(I).EARNINGS_HOUSE,
                                                 V_MERGE(I).QUANTITY,
                                                 V_MERGE(I).ACCOUNT_INTEGER));
      END LOOP;
      RETURN;
    END;I think the error is comming because of the parameter value of V_MERGE_REC. Since it is huge, so loading that into memory is causing problem. But in this case, how can I resolve it?? Can I use a global temporary table for this??
    Please suggest...

  • Help on Merge Statement ,I got 'ORA-00904: invalid column name' Error

    Pls help
    In Oracle 9i i implement the following qry
    MERGE INTO jobs A
    USING (select order_no,jOB_SEQ_NO from jobs_dlt) B
    ON (A.ORDER_NO = B.ORDER_NO and A.JOB_SEQ_NO =B.JOB_SEQ_NO )
    WHEN MATCHED THEN
    UPDATE SET
              A.ORDER_NO= B.ORDER_NO ,
              A.JOB_SEQ_NO= B.JOB_SEQ_NO           
    WHEN NOT MATCHED THEN
    INSERT (
              A.JOB_SEQ_NO ,
              A.ORDER_NO
    VALUES (
              B.JOB_SEQ_NO ,
              B.ORDER_NO
    but i got 'ORA-00904: invalid column name' Error
    JOBS table Contain the above Column
    how i implement the Merge Statment
    Thanks in advance
    By
    Sekar

    I seem to recall this error being spuriously (well unhelpfully) thrown if you tried to UPDATE a key that you used in the ON clause, but I could be mistaken.
    For us to recreate this you would need to supply the exact version and scripts to create the tables in question.

  • ORA 900 error while executing MERGE statement

    Hi All,
    I am using Oracle 11 Rg1.
    I have a summarization process running daily where the process of execution is as follows:-
    1. Data loads every 10 min into a transaction table from external dat files
    2. I have a package with 13 stored procedures - each procedure has a MERGE logic to summarize data from the above table into a summarization table. Each procedure select data depending on the business requirement
    3. A wrapper file is invoked by a crontab daily to execute each procedue in the above package sequentially
    4. Each of the 13 procs is executed and data summarized daily into the summarization tables
    From a few days, I have been getting a strange error - where 5 of the stored procs are failing with the error code and description as ORA 900 - invalid sql statement. The structure of all the 13 procs is the same. The only difference is in the MERGE logic WHERE clauses.
    Due to some data loss occurence I introduced conditions the WHERE clause that take into account pl/sql variables.
    I shall paste one procedure here and provide additional details as the discussion progress to avoid making this first post very lengthy.
    This logic is failing with ORA 900 when invoked from the wrapper in unix as :-
    exec PKG_ODS_AV_SUMMARY.SP_LOAD_ODS_AV_SUMMARY_BYSRCCD(sysdate-1,'');
    create or replace PACKAGE PKG_AV_SUMMARY AS
      PROCEDURE SP_LOAD_SUMMARY_BYSRCCD (pv_sum_enddate IN DATE, pv_summm_type_indicator IN VARCHAR2);
    END PKG_AV_SUMMARY;
    create or replace
    PACKAGE BODY PKG_AV_SUMMARY AS
    --Girish:07June2011 global variables
    -- Declaring package variables to hold common constant values
    c_status_inprogress VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSTATUS_INPROGRESS');
    c_status_success VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSTATUS_SUCCESS');
    c_status_failure VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSTATUS_FAILURE');
    c_summaryType_fullLoad VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSUMMTYPE_FULL');
    c_summaryType_incrementLoad VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSUMMTYPE_INCR');
    c_errordesc_summparamisN VARCHAR2(100) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSERRORDESC_SUMMPARAMISN');
    PROCEDURE SP_LOAD_SUMMARY_BYSRCCD (pv_sum_enddate IN DATE, pv_summm_type_indicator IN VARCHAR2)
    AS
    lv_table_name VARCHAR2(30) := 'AV_SUMMARY_BYSRCCD';
    ln_count NUMBER;
    lv_summarizationrequired VARCHAR2(2);
    lv_summm_type_indicator VARCHAR2(5);
    lv_sum_startdate DATE;
    lv_sum_enddate DATE;
    lv_partitioned_start_date DATE;
    lv_partitioned_end_date DATE;
    ln_errorcode NUMBER;
    lv_errormsg VARCHAR2(200);
    e_exception exception;
    BEGIN
    -- lv_summm_type_indicator is used as IN OUT parameter for SP_INS_SUMMARY_PARAMETERS procedure.
    lv_summm_type_indicator := pv_summm_type_indicator;
    PKG_SUMMARY_COMMON.SP_INS_SUMMARY_PARAMETERS(lv_table_name, pv_sum_enddate, lv_summm_type_indicator,
    lv_sum_startdate, lv_sum_enddate, ln_errorcode, lv_errormsg);
    --raise e_exception;
    IF ( lv_errormsg IS NOT NULL or LENGTH(lv_errormsg) <> 0 ) THEN
         raise e_exception;
    END IF;
    lv_summarizationrequired := PKG_SUMMARY_COMMON.FN_fetch_summarizationRequired(lv_table_name);
    IF( lv_summarizationrequired = 'Y' ) THEN
    BEGIN
    IF( lv_summm_type_indicator = c_summaryType_fullLoad) THEN
    PKG_SUMMARY_COMMON.SP_FETCH_PARTITION_DATE('ARTICLE_VIEWS',lv_sum_startdate,lv_sum_enddate,lv_partitioned_start_date,lv_partitioned_end_date);
    ELSE
    lv_partitioned_start_date := lv_sum_startdate;
    lv_partitioned_end_date := lv_sum_enddate;
    END IF;
    MERGE INTO av_summary_bysrccd
    USING
    (SELECT LAST_DAY(TRUNC(to_timestamp(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))) AS SUMMARY_DATE,
    os.acctnum,
    ol.sourcecode AS sourcecode,
    ol.sourcename AS sourcename,
    count(1) cnt_articleview
    FROM article_views os , master_sourcecode ol
    where os.sourcecode = ol.sourcecode
    AND os.acctnum IS NOT NULL
    AND ol.sourcecode IS NOT NULL
    AND os.requestdatetime IS NOT NULL
    AND UPPER(os.success_ind) = 'S'
         AND (
              (lv_summm_type_indicator  = c_summaryType_fullLoad
              AND  (get_date_timestamp(os.requestdatetime) BETWEEN lv_sum_startdate AND lv_sum_enddate
              AND   os.entry_CreatedDate BETWEEN lv_partitioned_start_date AND lv_partitioned_end_date
              OR (lv_summm_type_indicator = c_summaryType_incrementLoad
              AND os.entry_createddate BETWEEN lv_sum_startdate AND lv_sum_enddate )
    group by LAST_DAY(TRUNC(to_timestamp(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))),
    os.acctnum,ol.sourcecode,ol.sourcename) mrg_query
    ON (av_summary_bysrccd.acctnum = mrg_query.acctnum AND
    av_summary_bysrccd.summary_date=mrg_query.summary_date AND
    av_summary_bysrccd.sourcecode=mrg_query.sourcecode)
    WHEN NOT MATCHED THEN
    INSERT (SUMMARY_date,ACCTNUM,SOURCECODE,SOURCENAME,CNT_ARTICLEVIEW,ENTRY_LASTUPDATEDDATE)
    VALUES(mrg_query.summary_date,mrg_query.acctnum,mrg_query.sourcecode,mrg_query.sourcename,
    mrg_query.cnt_articleview,sysdate)
    WHEN MATCHED THEN
    UPDATE SET ods_av_summary_bysrccd.cnt_articleview=
    CASE WHEN NVL(lv_summm_type_indicator,c_summaryType_incrementLoad) = c_summaryType_fullLoad THEN mrg_query.cnt_articleview
    ELSE av_summary_bysrccd.cnt_articleview+mrg_query.cnt_articleview
    END,
    av_summary_bysrccd.entry_lastupdateddate=sysdate;
    PKG_SUMMARY_COMMON.SP_UPD_SUMMARY_PARAMETERS(lv_table_name,c_status_inprogress,c_status_success,'');
    END;
    ELSE
    PKG_SUMMARY_COMMON.SP_UPD_SUMMARY_PARAMETERS(lv_table_name,c_status_inprogress,c_status_failure,c_errordesc_summparamisN);
    END IF;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    BEGIN
    ROLLBACK;
    lv_errormsg := SQLERRM;
    ln_errorcode := SQLCODE;
    ln_count := PKG_SUMMARY_COMMON.FN_GET_COUNTOFTABLEINSUMMPARAM(lv_table_name,c_status_inprogress);
    IF ( ln_count <> 0 ) THEN
    PKG_SUMMARY_COMMON.SP_UPD_SUMMARY_PARAMETERS(lv_table_name,c_status_inprogress,c_status_failure,lv_errormsg);
    END IF;
    COMMIT;
    raise_application_error(-20004,lv_errormsg);
    END;
    END SP_LOAD_SUMMARY_BYSRCCD;
    END PKG_AV_SUMMARY;Edited by: Chaitanya on Aug 29, 2011 1:56 AM
    Edited by: Chaitanya on Aug 29, 2011 2:06 AM

    Hi Sven,
    Unfortunately, requestdatetime is a varchar2 column. The source table which has this column had been created a long back and recently we have started to take care of this issue by loading data after converting it into date format.
    We have managed to locate the place in the logic where the error is occuring, but not why it might be occuring. Its due to the logic:-
         AND (
              (lv_summm_type_indicator  = c_summaryType_fullLoad
              AND  (get_date_timestamp(os.requestdatetime) BETWEEN lv_sum_startdate AND lv_sum_enddate
              AND   os.entry_CreatedDate BETWEEN lv_partitioned_start_date AND lv_partitioned_end_date
              OR (lv_summm_type_indicator = c_summaryType_incrementLoad
              AND os.entry_createddate BETWEEN lv_sum_startdate AND lv_sum_enddate )
         )When I hardcoded the values for lv_summm_type_indicator, c_summaryType_fullLoad and c_summaryType_incrementLoad, the logic worked fine:
         AND (
              ('INCR'  = 'FULL'
              AND  (get_date_timestamp(os.requestdatetime) BETWEEN lv_sum_startdate AND lv_sum_enddate
              AND   os.entry_CreatedDate BETWEEN lv_partitioned_start_date AND lv_partitioned_end_date
              OR ('INCR'  = 'INCR'
              AND os.entry_createddate BETWEEN lv_sum_startdate AND lv_sum_enddate )
         )But, the data for the pl sql variables is coming properly as I used dbms_output statements to check. So not sure what exactly is happening.

  • Problem in merge statement -ORA-27432 Step does not exist for chain

    Hi
    I m getting ORA-27432 Step does not exist for chain error in merge statement.Please explain the same.
    MERGE INTO fos.pe_td_hdr_sd B
    USING (
             SELECT ACTIVE, ADDUID, ADDUIDTIME,TDKEY         FROM pe.pe_td_hdr
              WHERE  (adduidtime like '20070104%' or edituidtime like '20070104%')
              AND NVL(legacy_td,'N')<>'Y'
              AND SUBSTR(adduidtime,1,4)='2007'
              AND AMENDMENT_NO=0)A ON ( B.TDKEY = A.TDKEY)
      WHEN MATCHED THEN
        UPDATE SET B.ACTIVE=A.ACTIVE,
    B.ADDUID=A.ADDUID,
            B.ADDUIDTIME=A.ADDUIDTIME
      WHEN NOT MATCHED THEN
                      INSERT
                              B.ACTIVE,
                              B.ADDUID,
                              B.ADDUIDTIME)
                        VALUES(
                              A.ACTIVE,
                              A.ADDUID,
                              A.ADDUIDTIME)This query is a short version of the main query.It is same but having 180 columns in original table.

    What version of Oracle are you using? This message does not appear in my 10.1 Error Messages document, but the other messages in that range seem to be about DBMS_SCHEDULER.
    Are you using scheduler somewhere around where you are getting the error message?
    John

  • Error in MERGE statement - ORA-00969: missing ON keyword

    Hi All ,
    I am trying to write a Merge statement , but I am getting the below error .
       MERGE  INTO main_table m
                              USING  tab_1 l, tab_2 u
                              ON  (   l.col1        =  m.col1
                                       AND u.col2 = l.col2)
    When Matched then
    update........
    When not mached then
    Insert  ...... 
    But here I am using 2 tables in the USING clause . and here I am getting  this error :-
    142/17   PL/SQL: SQL Statement ignored
    143/42   PL/SQL: ORA-00969: missing ON keyword
    May I know where i am doing wrong ?

    Hi LuKKa, you are on the Portugues Forum, but we can help you, try the code mentioned below:
       MERGE  INTO main_table m
                              USING  (select l.col1, l.col2, u.col2 from tab_1 l join tab_2 u on (u.col2 = l.col2)) t
                              ON  (t.col1 =  m.col1)
    When Matched then
    update........
    When not mached then
    Insert  ......  
    Regards.

  • Getting ORA-00904 from various SPARQL statements

    Hi,
    I am currently working on a couple of Java services which offer access to semantic information using Jena. I have implemented two possible adapters so far, one "feeds" from an owl-file directly, one from an Oracle 11g (semantic technologies).
    In both cases, I use SPARQL SELECT and CONSTRUCT statements for my queries. Querying the owl-file-based adapter with these statements, everything works fine. querying the Oracle adapter, I often get the following stacktrace:
    Caused by: java.sql.SQLException: ORA-00904: "TYPE": ungültiger Bezeichner
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
         at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:352)
         at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:315)
         at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:431)
         ... 65 more
    The SELECT statement used is:
    ==============
    PREFIX owl: <http://www.w3.org/2002/07/owl#>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    SELECT DISTINCT ?type ?label ?comment
    WHERE { <http://www.demo-uri.com/test.owl#demoInstance> rdf:type ?type .
    OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:label ?label .
    FILTER(langMatches(lang(?label),'de') || (!langMatches(lang(?label),'*'))) . }
    OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:comment ?comment .
    FILTER(langMatches(lang(?comment),'de') || (!langMatches(lang(?comment),'*'))) }
    ==============
    The generated SELECT clause is:
    SELECT type$RDFVTYP, type$RDFLTYP, type$RDFLANG, type$RDFCLOB, decode(type$RDFVTYP, 'BLN', ('_:'||substr(type,instr(type,'m',4)+1)), type) type
    FROM table(sdo_rdf_match('(<http://www.demo-uri.com/test.owl#demoInstance> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type) ', sdo_rdf_models('DEMO_MODEL'), sdo_rdf_rulebases('OWLPRIME'), null, null, NULL,' '))
    I am really grateful for any advise! A simple statement like
    [...]WHERE { <http://www.demo-uri.com/test.owl#demoInstance> rdf:type ?type }
    works fine.
    Best,
    Damian

    Thanks for the reply.
    I have changed the statement according to your advice:
    PREFIX owl: <http://www.w3.org/2002/07/owl#>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    SELECT DISTINCT ?typ ?lbl ?cmnt
    WHERE { <http://www.demo-uri.com/test.owl#demoInstance> rdf:type ?typ .
    OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:label ?lbl .
    FILTER(langMatches(lang(?lbl),"de") || (!langMatches(lang(?lbl),"*"))) . }
    OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:comment ?cmnt .
    FILTER(langMatches(lang(?cmnt),"de") || (!langMatches(lang(?cmnt),"*"))) }}
    but still the same stacktrace :(
    Caused by: java.sql.SQLException: ORA-00904: "TYP": ungültiger Bezeichner
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
         at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:352)
         at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:315)
         at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:431)
         ... 65 more
    Edited by: user13170651 on 22.09.2010 02:32

  • Issue with Oracle Merge statements (PL/SQL: ORA-00913: too many values)

    Hi All,
    I am using the below merge statement and I am getting too many rows issues when I am compiling.
    BEGIN
    FOR te_rec IN ( SELECT /*+ parallel(ts,4) */ te.dtv_acct_num FROM telcos_eligible te, telcos_setup ts, telcos_partners tp
    WHERE tp.telcos_name = UPPER((p_telcos_name))
    AND ts.partner_id = tp.partner_id
    AND te.ts_id = ts.ts_id ) LOOP
    MERGE INTO tcs_accounts
    USING (
    SELECT /*+ DRIVING_SITE(a) */account_id, a.subscriber_id, status, account_type FROM account@tcs_to_paris a WHERE a.subscriber_id = te_rec.dtv_acct_num
    ) paris_accounts
    ON (tcs_accounts.subscriber_id = paris_accounts.subscriber_id)
    WHEN MATCHED THEN
    UPDATE SET
    account_type = paris_accounts.account_type,
    subscriber_id = paris_acounts.subscriber_id,
    status = paris_accounts.status
    WHEN NOT MATCHED THEN
    INSERT(account_id, subscriber_id, status_account_type)
    VALUES(paris_accounts.account_id, paris_accounts.subscriber_id, paris_accounts.status, paris_accounts.account_type);
    END LOOP;
    END;
    Can you let me know what is the issue here.
    Thanks,
    MK.

    Hi,
    Maddy wrote:
    ... WHEN NOT MATCHED THEN
    INSERT(account_id, subscriber_id, status_account_type)
    VALUES(paris_accounts.account_id, paris_accounts.subscriber_id, paris_accounts.status, paris_accounts.account_type);This is one of the many times when a little formatting can really help you. Anybody can forget a column (or have an extra one, or type a _ when they mean ,) but if you write code like this
    INSERT (               account_id,                 subscriber_id,                                  status_account_type)
    VALUES (paris_accounts.account_id,  paris_accounts.subscriber_id,  paris_accounts.status,  paris_accounts.account_type);you might spot the error yourself.
    Always format your code. When you post any formatted text on thsi site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Merge Statement in ABAP

    Dear Gurrus,
    i am having a trouble in using oracle merge statement in abap, the moment i use where clause in the bottom it  gives me an oracle error
    EXEC SQL.
      MERGE INTO SAP_GL_ACCOUNT@GETZDB a
      USING SKA1 b
        ON (A.gl_code= B.SAKNR)
      WHEN MATCHED THEN
        UPDATE SET a.posting_block =  B.XSPEB,
                   a.locked        =  B.XSPEA,
                   A.BALANCE_SHEET =  B.XBILK
         WHEN NOT MATCHED THEN
           insert   (gl_code,
                     DESCRIPTION,
                     posting_block,
                     locked,
                     balance_sheet)
          VALUES (b.SAKNR,'shadab',B.XSPEB,B.XSPEA,B.XBILK)
          where b. mandt = 950      I am talking about this line
             ENDEXEC.
    the Moment  i include WHERE clause in the botton before ENDEXEC it generates as error
    " Database error text........: "ORA-00904: "A3"."MANDT": invalid  identifier#ORA-02063: preceding line from GETZDB".
    although its a basic feature of Oracle to inclue where clauses in insert or update in merge, but here it is generating an error.

    Hello Shadab,
    As per my understanding of this oracle native sql code.
    everything is fine except the use of direct value i.e 950 .
    System is not able to process this value .
    This normally happens even in normal abap sql statements also.
    The better solution could be to declare a variable with the
    same data type as "mandt" and then pass this "950" value into that
    variable and then use this variable in the where clause instead of directly
    passing the value.
    i.e data:l_var type mandt vlaue '950'.
    The other option could be to use the same hard coded
    value but use this value in the where clause in quotations i.e.,
    '950' instead of 950.
    I hope this would solve your purpose, If not please reply me back.
    thanks,
    M.Naveen Kumar.

  • Merge Statement Giving Error

    Hi Everyone,
    I am trying to use MERGE statement for my Data Load. But it is giving out an un-understandable error. It In the "ON" Part, it refuses to recognise the destination table columns...
    like I say ON(dest.Per_No = Src.Per_No), and it says "Invalid Identifier dest.Per_No"
    Any Ideas, am pasting shortened version of my SQL:
    ========================================
    SQL> ed
    Wrote file afiedt.buf
    1 MERGE INTO CIPIC.Dest P
    2 USING (SELECT Src1.ROW_ID AS PER_No,
    3 LTRIM(Src2.PARTY_ID,'0') AS ARN,
    4 ....
    9 FROM Src1,Src2,....
    12 WHERE MANY JOINS GO HERE) S
    16 ON (P.PER_No = S.PER_No AND P.A_Column = S.A_Column)
    17 WHEN MATCHED THEN UPDATE SET P.blah = S.blah1
    24 WHEN NOT MATCHED THEN INSERT (PER_No, A_Column,....)
    26 VALUES (S.PER_No, .A_Column, ......)
    SQL> /
    ON (P.PER_No = S.PER_No AND P.A_Column = S.A_Column)
    ERROR at line 16:
    ORA-00904: "P"."PER_No": invalid identifier

    See here
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_915a.htm#2080942
    >
    Restrictions on Updating a View
    You cannot specify DEFAULT when updating a view.
    You cannot update a column that is referenced in the ON condition clause.
    Rgds.

  • Problem with MERGE statement

    Hi All,
    We are encountering a strange problem with the merge command.
    The following statement works :-
    merge into ATTRIBUTE_GROUP@US_PRODUCT_UAT a
    using
         select
              a1.group_id,
              a1.NAME,
              a1.CREATE_DATE,
              a1.MODIFY_DATE
         from
              ATTRIBUTE_GROUP_LOG a1,
              product_push_wrk a2
         where
              a2.column_id = a1.group_id and
              a2.modify_date = a1.modify_date ) b
    on ( a.group_id = b.group_id)
    when matched then
         update set
              a.NAME = b.NAME,
              a.CREATE_DATE = b.CREATE_DATE,
              a.MODIFY_DATE = b.MODIFY_DATE
    when not matched then
         insert
              a.group_id,
              a.NAME,
              a.CREATE_DATE,
              a.MODIFY_DATE
         values
              b.group_id,
              b.NAME,
              b.CREATE_DATE,
              b.MODIFY_DATE
    However when we change the order of the columns in the select query as follows the an error occurs : -
    merge into ATTRIBUTE_GROUP@US_PRODUCT_UAT a
    using
         select
              a1.NAME,
              a1.group_id,
              a1.CREATE_DATE,
              a1.MODIFY_DATE
         from
              ATTRIBUTE_GROUP_LOG a1,
              product_push_wrk a2
         where
              a2.column_id = a1.group_id and
              a2.modify_date = a1.modify_date ) b
    on ( a.group_id = b.group_id)
    when matched then
         update set
              a.NAME = b.NAME,
              a.CREATE_DATE = b.CREATE_DATE,
              a.MODIFY_DATE = b.MODIFY_DATE
    when not matched then
         insert
              a.group_id,
              a.NAME,
              a.CREATE_DATE,
              a.MODIFY_DATE
         values
              b.group_id,
              b.NAME,
              b.CREATE_DATE,
              b.MODIFY_DATE
    ERROR at line 15:
    ORA-00904: "B"."GROUP_ID": invalid identifier
    SQL> l 15
    15* on ( a.group_id = b.group_id)
    The structure of the attribute_log table is as follows :-
    SQL> desc ATTRIBUTE_GROUP
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE NOT NULL DATE
    MODIFY_DATE NOT NULL DATE
    Any pointers to the cause of this error will be highly appreciated.
    Thanks and Regards,
    Suman

    The table structures are as follows :-
    04:17:17 SQL> desc product_push_wrk
    Name Null? Type
    COLUMN_ID NOT NULL NUMBER
    TYPE NOT NULL VARCHAR2(10)
    PARENT_COLUMN_ID NUMBER
    LEVEL_NO NUMBER
    MODIFY_DATE NOT NULL DATE
    04:17:25 SQL> desc ATTRIBUTE_GROUP_LOG
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE DATE
    MODIFY_DATE DATE
    04:18:02 SQL> desc ATTRIBUTE_GROUP
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE DATE
    MODIFY_DATE DATE

  • Help for merge statement?

    I have a problem in Merge statement. My merge statement is following:
    MERGE INTO hoadon hd
    USING (
    SELECT m.ma_ttoan, t.ma_ttoan ma_kh
    FROM tai_anhxa_makh t
    INNER JOIN hoadon m on t.ma_kh = m.ma_ttoan
    WHERE m.thang_nam = '200908' and m.ma_ttoan not like 'DLC%' and t.ma_ttoan IS NOT NULL
    GROUP BY m.ma_ttoan, t.ma_ttoan
    ) m ON (hd.ma_ttoan = m.ma_kh)
    WHEN MATCHED THEN
    UPDATE SET ma_ttoan = m.ma_ttoan
    WHEN NOT MATCHED THEN
    INSERT (thang_nam, ma_ttoan) VALUES('200908','thaodv')
    After execute this query, PS/SQL show error message: "ORA-00904: hd.ma_ttoan invalid identifier"
    I'm using Oracle version 9i
    Can anyone help me to resolve this problem?
    Thanks in advance

    In 9i you can't use the columns from the ON clause in your UPDATE part of the MERGE statement
    this is invalid:
    UPDATE SET ma_ttoan = m.ma_ttoanuse a different column here.

  • Invalid Number Error in Merge Statement

    Hi all.
    I got an invalid number error in the following merge statement, but I don't know why. Maybe you can give me a hint.
    MERGE INTO wam_table
    USING (SELECT * FROM wam_table) b
    ON (b.username = 'user'
    AND b.mod = 'module'
    AND b.trimester = '1')
    WHEN MATCHED THEN
    UPDATE SET as = '1', ad = '1', co = '1', pr = '1', date = localtimestamp, lus = 'username'
    WHEN NOT MATCHED THEN
    INSERT VALUES ('user','module','1','1','1','1','1', localtimestamp, 'username');
    The invalid number error appears in the first line, but I don't know why?
    Stephan

    UPDATE SET as = '1', ad = '1', co = '1', pr = '1', date = localtimestamp, lus = 'username'SELECT * FROM sys.v_$reserved_words;
    SQL> create table test1(as varchar2(10));
    create table test1(as varchar2(10))
    ERROR at line 1:
    ORA-00904: : invalid identifier
    SQL> create table test1(sno number, date date);
    create table test1(sno number, date date)
    ERROR at line 1:
    ORA-00904: : invalid identifier
    SQL> create table test1("as" varchar2(10));
    Table created.
    SQL>
    SQL> create table test2(sno number, "date" date);
    Table created.
    SQL> desc test1
    Name                                      Null?    Type
    as                                                 VARCHAR2(10)
    SQL> desc test2
    Name                                      Null?    Type
    SNO                                                NUMBER
    date                                               DATE
    SQL> 

  • Same exact update runs fine in one db but causes ORA-00904 in another

    I have an update statement that runs fine in one db but causes "" error in another. The two databases table structures are the same. I checked for synonyms and reserved words on BASE and COMPANY_ID but did not come up with anything. The db where it is working is 10.2. The db where it is not working is 10.1.
    Here is the statement:
    1 UPDATE t_company base
    2 SET (company_name, company_name_sid, company_name_lco, canonical_name,
    3 short_name, short_name2) =
    4 (SELECT company_name, source_id, company_name_lco, canonical_name,
    5 short_name, short_name2
    6 FROM t_auth_company comp
    7 WHERE comp.company_id = base.company_id
    8 AND source_id =
    9 (SELECT source_id
    10 FROM (SELECT auth.source_id, trumping_order
    11 FROM t_auth_company auth,
    12 t_trumping_rule rl
    13 WHERE auth.company_id = base.company_id
    14 AND auth.company_name IS NOT NULL
    15 AND rl.source_id = auth.source_id
    16 AND rl.attribute_id = 'abc'
    17 ORDER BY rl.trumping_order)
    18 WHERE ROWNUM = 1))
    19 WHERE
    20 (-- The company has been updated
    21 company_id IN (
    22 SELECT company_id
    23 FROM t_auth_company auth
    24 WHERE auth.company_name_lco >= sysdate
    25 OR auth.company_id_lco >= sysdate)
    26 OR
    27 ( -- The trumping rule for the attribute has been changed
    28 SELECT MAX(last_changed_on)
    29 FROM t_trumping_rule rl
    30 WHERE rl.attribute_id = 'abc' ) >= sysdate
    31 )
    32 -- The company has been merged
    33 AND 1 < (SELECT COUNT (*)
    34 FROM t_auth_company auth
    35* WHERE auth.company_id = base.company_id)
    SQL> /
    WHERE auth.company_id = base.company_id
    ERROR at line 13:
    ORA-00904: "BASE"."COMPANY_ID": invalid identifier
    Thank You
    Boris

    Thank you for responding. It is syntactically working in the 10.2 database. Please, see this:
    SQL> UPDATE t_company base
    2 SET (company_name, company_name_sid, company_name_lco, canonical_name,
    3 short_name, short_name2) =
    4 (SELECT company_name, source_id, company_name_lco, canonical_name,
    5 short_name, short_name2
    6 FROM t_auth_company comp
    7 WHERE comp.company_id = base.company_id
    8 AND source_id =
    9 (SELECT source_id
    10 FROM (SELECT auth.source_id, trumping_order
    11 FROM t_auth_company auth,
    12 t_trumping_rule rl
    13 WHERE auth.company_id = base.company_id
    14 AND auth.company_name IS NOT NULL
    15 AND rl.source_id = auth.source_id
    16 AND rl.attribute_id = 'abc'
    17 ORDER BY rl.trumping_order)
    18 WHERE ROWNUM = 1))
    19 WHERE
    20 (-- The company has been updated
    21 company_id IN (
    22 SELECT company_id
    23 FROM t_auth_company auth
    24 WHERE auth.company_name_lco >= sysdate
    25 OR auth.company_id_lco >= sysdate)
    26 OR
    27 ( -- The trumping rule for the attribute has been changed
    28 SELECT MAX(last_changed_on)
    29 FROM t_trumping_rule rl
    30 WHERE rl.attribute_id = 'abc' ) >= sysdate
    31 )
    32 -- The company has been merged
    33 AND 1 < (SELECT COUNT (*)
    34 FROM t_auth_company auth
    35 WHERE auth.company_id = base.company_id)
    36 /
    0 rows updated.
    SQL>
    The table structures are as follows:
    CREATE TABLE RTCR_UCDB.T_AUTH_COMPANY
    AUTH_COMPANY_ID NUMBER(22),
    SOURCE_ID NUMBER(3) NOT NULL,
    LD_COMPANY_ID NUMBER(22),
    SOURCE_COMPANY_ID VARCHAR2(150 BYTE),
    MATCH_DECISION NUMBER(1) DEFAULT 0 NOT NULL,
    MATCH_DECISION_LCO DATE DEFAULT sysdate,
    COMPANY_ID NUMBER(22),
    COMPANY_ID_LCO DATE,
    COMPANY_NAME VARCHAR2(150 BYTE),
    COMPANY_NAME_LCO DATE DEFAULT sysdate,
    CANONICAL_NAME VARCHAR2(150 BYTE),
    SHORT_NAME VARCHAR2(150 BYTE),
    SHORT_NAME2 VARCHAR2(150 BYTE),
    URL VARCHAR2(150 BYTE),
    URL_LCO DATE DEFAULT sysdate,
    NURL VARCHAR2(150 BYTE),
    PRIMARY_SIC VARCHAR2(150 BYTE),
    PRIMARY_SIC_LCO DATE DEFAULT sysdate,
    PRIMARY_TICKER VARCHAR2(15 BYTE),
    PRIMARY_TICKER_LCO DATE DEFAULT sysdate,
    EXCHANGE_ID VARCHAR2(60 BYTE),
    EXCHANGE_ID_LCO DATE DEFAULT sysdate,
    NEXCHANGE_ID VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(150 BYTE),
    ADDRESS_LCO DATE DEFAULT sysdate,
    NADDRESS VARCHAR2(150 BYTE),
    NADDRESS_CONTAINS VARCHAR2(150 BYTE),
    CITY VARCHAR2(150 BYTE),
    CITY_LCO DATE DEFAULT sysdate,
    NCITY VARCHAR2(150 BYTE),
    STATE VARCHAR2(150 BYTE),
    STATE_LCO DATE DEFAULT sysdate,
    NSTATE VARCHAR2(150 BYTE),
    POSTAL_CODE VARCHAR2(15 BYTE),
    POSTAL_CODE_LCO DATE DEFAULT sysdate,
    NPOSTAL_CODE VARCHAR2(15 BYTE),
    COUNTRY_ID VARCHAR2(10 BYTE),
    COUNTRY_ID_LCO DATE DEFAULT sysdate,
    NCOUNTRY_ID VARCHAR2(10 BYTE),
    TELEPHONE VARCHAR2(60 BYTE),
    TELEPHONE_LCO DATE DEFAULT sysdate,
    NPHONE VARCHAR2(60 BYTE),
    PHONE_7D VARCHAR2(60 BYTE),
    PHONE_AREA VARCHAR2(60 BYTE),
    FAX VARCHAR2(60 BYTE),
    FAX_LCO DATE DEFAULT sysdate,
    NFAX VARCHAR2(60 BYTE),
    GW_COMPANY_ID VARCHAR2(150 BYTE),
    GW_COMPANY_ID_LCO DATE DEFAULT sysdate,
    CIK_NUMBER VARCHAR2(150 BYTE),
    CIK_NUMBER_LCO DATE DEFAULT sysdate,
    IRS_EIN VARCHAR2(150 BYTE),
    IRS_EIN_LCO DATE DEFAULT sysdate,
    MIN_DATA_FLAG VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
    OBSOLETE_FLAG VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
    OBSOLETE_FLAG_LCO DATE,
    LAST_CHANGED_BY VARCHAR2(50 BYTE) DEFAULT user NOT NULL,
    LAST_CHANGED_ON DATE DEFAULT sysdate NOT NULL,
    CREATED_ON DATE NOT NULL
    CREATE TABLE RTCR_UCDB.T_TRUMPING_RULE
    SOURCE_ID NUMBER(3) NOT NULL,
    ATTRIBUTE_ID NUMBER(5) NOT NULL,
    TRUMPING_ORDER NUMBER(3),
    LAST_CHANGED_BY VARCHAR2(50 BYTE) DEFAULT USER,
    LAST_CHANGED_ON DATE DEFAULT sysdate
    CREATE TABLE RTCR_UCDB.T_COMPANY
    COMPANY_ID NUMBER(22),
    COMPANY_NAME VARCHAR2(150 BYTE),
    COMPANY_NAME_SID NUMBER(3),
    COMPANY_NAME_LCO DATE,
    CANONICAL_NAME VARCHAR2(150 BYTE),
    SHORT_NAME VARCHAR2(150 BYTE),
    SHORT_NAME2 VARCHAR2(150 BYTE),
    URL VARCHAR2(150 BYTE),
    URL_SID NUMBER(3),
    URL_LCO DATE,
    NURL VARCHAR2(150 BYTE),
    PRIMARY_SIC VARCHAR2(150 BYTE),
    PRIMARY_SIC_SID NUMBER(3),
    PRIMARY_SIC_LCO DATE,
    PRIMARY_TICKER VARCHAR2(15 BYTE),
    PRIMARY_TICKER_SID NUMBER(3),
    PRIMARY_TICKER_LCO DATE,
    EXCHANGE_ID VARCHAR2(60 BYTE),
    EXCHANGE_ID_SID NUMBER(3),
    EXCHANGE_ID_LCO DATE,
    NEXCHANGE_ID VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(150 BYTE),
    ADDRESS_SID NUMBER(3),
    ADDRESS_LCO DATE,
    NADDRESS VARCHAR2(150 BYTE),
    CITY VARCHAR2(150 BYTE),
    CITY_SID NUMBER(3),
    CITY_LCO DATE,
    NCITY VARCHAR2(150 BYTE),
    STATE VARCHAR2(150 BYTE),
    STATE_SID NUMBER(3),
    STATE_LCO DATE,
    NSTATE VARCHAR2(150 BYTE),
    POSTAL_CODE VARCHAR2(15 BYTE),
    POSTAL_CODE_SID NUMBER(3),
    POSTAL_CODE_LCO DATE,
    NPOSTAL_CODE VARCHAR2(15 BYTE),
    COUNTRY_ID VARCHAR2(10 BYTE),
    COUNTRY_ID_SID NUMBER(3),
    COUNTRY_ID_LCO DATE,
    NCOUNTRY_ID VARCHAR2(10 BYTE),
    TELEPHONE VARCHAR2(60 BYTE),
    TELEPHONE_SID NUMBER(3),
    TELEPHONE_LCO DATE,
    NPHONE VARCHAR2(60 BYTE),
    PHONE_7D VARCHAR2(60 BYTE),
    PHONE_AREA VARCHAR2(60 BYTE),
    FAX VARCHAR2(60 BYTE),
    FAX_SID NUMBER(3),
    FAX_LCO DATE,
    NFAX VARCHAR2(60 BYTE),
    GW_COMPANY_ID VARCHAR2(150 BYTE),
    GW_COMPANY_ID_SID NUMBER(3),
    GW_COMPANY_ID_LCO DATE,
    CIK_NUMBER VARCHAR2(150 BYTE),
    CIK_NUMBER_SID NUMBER(3),
    CIK_NUMBER_LCO DATE,
    IRS_EIN VARCHAR2(150 BYTE),
    IRS_EIN_SID NUMBER(3),
    IRS_EIN_LCO DATE,
    LAST_CHANGED_BY VARCHAR2(50 BYTE) DEFAULT user NOT NULL,
    LAST_CHANGED_ON DATE DEFAULT sysdate NOT NULL,
    CREATED_ON DATE NOT NULL
    )

  • 11.5.10.2 to R12.1.1 upgrade : ORA-20000: Oracle Error Rebuild1= -904 - ORA-00904: "TAB"."USER_PROP": invalid identifier

    EBS version : 11.5.10.2
    DB version : 11.2.0.3
    OS version : AIX 6.1 (64 bit)
    As a part of 11.5.10.2 to R12.1.1 upgrade, while applying merged 12.1.1 upgrade driver(u6678700.drv), I got below error :
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ATTENTION: All workers either have failed or are waiting:
    FAILED: file ECXQBKUP.sql on worker 1.
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Worker 1 log:
    ========================================
    Start time for file is: Mon Aug 05 2013 10:54:29
    sqlplus -s APPS/***** @/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql/ECXQBKUP.sql &un_apps &pw_apps &un_fnd
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    declare
    ERROR at line 1:
    ORA-20000: Oracle Error Rebuild1= -904 - ORA-00904: "TAB"."USER_PROP": invalid
    identifier
    ORA-06512: at line 46

    I tried fix inside 12.0.6 Patch 6728000 Fails On Ecxqbkup.Sql (Doc ID 760122.1) but getting same error :
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>sqlplus apps/apps
    SQL*Plus: Release 10.1.0.5.0 - Production on Tue Aug 6 11:51:44 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> @ECXQBKUP.sql apps apps applsys
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
      select count(*) into in_cnt from ecx_inqueue
    ERROR at line 26:
    ORA-06550: line 26, column 36:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 26, column 3:
    PL/SQL: SQL Statement ignored
    drix10:/home/appltest>sqlplus '/as sysdba'
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 6 11:47:38 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exec dbms_aqadm.drop_queue_table( queue_table=> 'APPS.ECX_INQUEUE',force=>true);
    PL/SQL procedure successfully completed.
    SQL> exec dbms_aqadm.drop_queue_table( queue_table=> 'APPS.ECX_OUTQUEUE',force=>true);
    PL/SQL procedure successfully completed.
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>sqlplus apps/apps
    SQL*Plus: Release 10.1.0.5.0 - Production on Tue Aug 6 11:52:07 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> @ECXINQ.sql
    Enter value for 4: system
    Enter value for 5: manager
    Connected.
    Enter value for 1: apps
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Enter value for 2: apps
    Connected.
    PL/SQL procedure successfully completed.
    Commit complete.
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>sqlplus apps/apps
    SQL*Plus: Release 10.1.0.5.0 - Production on Tue Aug 6 11:53:38 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> @ECXGINQ.sql
    Enter value for 4: system
    Enter value for 5: manager
    Connected.
    Enter value for 1: apps
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Enter value for 2: apps
    Connected.
    PL/SQL procedure successfully completed.
    Commit complete.
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>sqlplus apps/apps
    SQL*Plus: Release 10.1.0.5.0 - Production on Tue Aug 6 11:54:04 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> @ECXOUTQ.sql
    Enter value for 4: system
    Enter value for 5: manager
    Connected.
    Enter value for 1: apps
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Enter value for 2: apps
    Connected.
    PL/SQL procedure successfully completed.
    Commit complete.
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>
    drix10:/fmstop/r12apps/apps/apps_st/appl/ecx/12.0.0/patch/115/sql>sqlplus apps/apps @ECXQBKUP.sql apps apps applsys
    SQL*Plus: Release 10.1.0.5.0 - Production on Tue Aug 6 11:54:26 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    declare
    ERROR at line 1:
    ORA-20000: Oracle Error Rebuild1= -904 - ORA-00904: "TAB"."USER_PROP": invalid
    identifier
    ORA-06512: at line 46
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

Maybe you are looking for

  • Can't send or receive mail from certain e-mail address...

    Has anyone ever run into an instance where you couldn't send or receive mail to a 1 specific e-mail address? Even after adding the address to your contact list? Here's my situation. There is one person that is trying to e-mail me, but no matter what

  • Only sound, when I export HDV project with Quicktime

    I'm working with Final Cut Pro 5.0 (yes I know I have to upgrade) with material from HV 20. When I export my finished project with the export to Quicktime opt. I can't watch the movie in Quicktime player, Itunes, VLC or MPEG Streamclip, only in FCP.

  • Interfaces and Classpath

    Hi.. I have this question regarding the use of interface..Since java doesnt provide multiple inheritance capability it provides the interface.. So my question is when we write down some piece of code for example public interface Moveable{ \\ methods(

  • Understanding  TableModels (HELP)

    I'm looking for some resources that may help me understand the function of TableModels. I'm creating a two column table that will update in realtime w/ x y coordinates which will be streaming via a digitizer. My model is something like this. JTable -

  • Creeping GUI death

    Folks: Recently, I've been experiencing a frustrating increase in the number of GUI crashes. Now up to at least one a day. The first symptom is graphic trash showing up on the currently active window. Pretty soon trash shows up all over: on the menu