Update statement - no data found issue

Hello,
I have two tables (temp_A and temp_B), they both have two columns (col_1 and col_2)
The following is the data in temp_A:
(1,'A'), (2,'B'), (3,'C'), (4, 'D'), (5, 'E')
The following is the data in temp_B:
(1,'Z'), (2,'Y'), (3,'X'), (4, 'W')
When I run the following query:
update temp_A set col_2 = (select col_2 from temp_B where temp_A.col_1 = temp_B.col_1);
The outcome of temp_A is
(1,'Z'), (2,'Y'), (3,'X'), (4, 'W'), (5,'')
Is there any way that I can get this update statement to skip the row if no data is found instead of setting it to null (because the pairing does not exist in temp_B and thus (5,'') is misleading).
Thanks in advance,
Ivan

Try this -
MERGE INTO temp_a a
   USING (SELECT b.col_1, b.col_2
            FROM temp_b b) b1
   ON (a.col_1 = b1.col_1)
   WHEN MATCHED THEN
      UPDATE
         SET a.col_2 = b1.col_2;Tested -
SQL> select * from temp_a;
     COL_1 CO
         1 A
         2 B
         3 C
         4 D
         5 E
Elapsed: 00:00:00.00
SQL>
SQL> select * from temp_b;
     COL_1 CO
         1 Z
         2 Y
         3 X
         4 W
SQL> MERGE INTO temp_a a
  2     USING (SELECT b.col_1, b.col_2
  3              FROM temp_b b) b1
  4     ON (a.col_1 = b1.col_1)
  5     WHEN MATCHED THEN
  6        UPDATE
  7           SET a.col_2 = b1.col_2
  8        ;
4 rows merged.
SQL> select * from temp_a;
     COL_1 CO
         1 Z
         2 Y
         3 X
         4 W
         5 EEdited by: Sri on May 26, 2011 1:41 PM
Edited by: Sri on May 26, 2011 1:49 PM

Similar Messages

  • ORA-01403 No Data Found Issue

    Hi,
    Im very new to streams and having a doubt regarding ORA-01403 issue happening while replication. Need you kind help on this regard. Thanks in advance.
    Oracle version : 10.0.3.0
    1.Suppose there are 10 LCRs in a Txn and one of the LCR caused ORA-01403 and none of the LCRs get executed.
    We can read the data of this LCR and manually update the record in the Destination database.
    Eventhough this is done, while re-executing the transaction, im getting the same ORA-01403 on the same LCR.
    What could be the possible reason.
    Since, this is a large scale system with thousands of transactions, it is not possible to handle the No data found issues occuring in the system.
    I have written a PL/SQL block which can generate Update statements with the old data available in LCR, so that i can re-execute the Transaction again.
    The PL/SQL block is given below. Could you please check if there are any issues in this while generating the UPDATE statements. Thank you
    /* Formatted on 2008/10/23 14:46 (Formatter Plus v4.8.7) */
    --Script for generating the Update scripts for the Message which caused the 'NO DATA FOUND' error.
    DECLARE
    RES NUMBER; --No:of errors to be resolved
    RET NUMBER; --A number variable to hold the return value from getObject
    I NUMBER; --Index for the loop
    J NUMBER; --Index for the loop
    K NUMBER; --Index for the loop
    PK_COUNT NUMBER; --To Hold the no:of PK columns for a Table
    LCR ANYDATA; --To Hold the Logical Change Record
    TYP VARCHAR2 (61); --To Hold the Type of a Column
    ROWLCR SYS.LCR$_ROW_RECORD; --To Hold the LCR caused the error in a Txn.
    OLDLIST SYS.LCR$_ROW_LIST; --To Hold the Old data of the Record which was tried to Update/Delete
    NEWLIST SYS.LCR$_ROW_LIST;
    UPD_QRY VARCHAR2 (5000);
    EQUALS VARCHAR2 (5) := ' = ';
    DATA1 VARCHAR2 (2000);
    NUM1 NUMBER;
    DATE1 TIMESTAMP ( 0 );
    TIMESTAMP1 TIMESTAMP ( 3 );
    ISCOMMA BOOLEAN;
    TYPE TAB_LCR IS TABLE OF ANYDATA
    INDEX BY BINARY_INTEGER;
    TYPE PK_COLS IS TABLE OF VARCHAR2 (50)
    INDEX BY BINARY_INTEGER;
    LCR_TABLE TAB_LCR;
    PK_TABLE PK_COLS;
    BEGIN
    I := 1;
    SELECT COUNT ( 1)
    INTO RES
    FROM DBA_APPLY_ERROR;
    FOR TXN_ID IN
    (SELECT MESSAGE_NUMBER,
    LOCAL_TRANSACTION_ID
    FROM DBA_APPLY_ERROR
    WHERE LOCAL_TRANSACTION_ID =
    '2.85.42516'
    ORDER BY ERROR_CREATION_TIME)
    LOOP
    SELECT DBMS_APPLY_ADM.GET_ERROR_MESSAGE
    (TXN_ID.MESSAGE_NUMBER,
    TXN_ID.LOCAL_TRANSACTION_ID
    INTO LCR
    FROM DUAL;
    LCR_TABLE (I) := LCR;
    I := I + 1;
    END LOOP;
    I := 0;
    K := 0;
    dbms_output.put_line('size >'||lcr_table.count);
    FOR K IN 1 .. RES
    LOOP
    ROWLCR := NULL;
    RET :=
    LCR_TABLE (K).GETOBJECT
    (ROWLCR);
    --dbms_output.put_line(rowlcr.GET_OBJECT_NAME);
    PK_COUNT := 0;
    --Finding the PK columns of the Table
    SELECT COUNT ( 1)
    INTO PK_COUNT
    FROM ALL_CONS_COLUMNS COL,
    ALL_CONSTRAINTS CON
    WHERE COL.TABLE_NAME =
    CON.TABLE_NAME
    AND COL.CONSTRAINT_NAME =
    CON.CONSTRAINT_NAME
    AND CON.CONSTRAINT_TYPE = 'P'
    AND CON.TABLE_NAME =
    ROWLCR.GET_OBJECT_NAME;
    dbms_output.put_line('Count of PK Columns >'||pk_count);
    DEL_QRY := NULL;
    DEL_QRY :=
    'DELETE FROM '
    || ROWLCR.GET_OBJECT_NAME
    || ' WHERE ';
    INS_QRY := NULL;
    INS_QRY :=
    'INSERT INTO '
    || ROWLCR.GET_OBJECT_NAME
    || ' ( ';
    UPD_QRY := NULL;
    UPD_QRY :=
    'UPDATE '
    || ROWLCR.GET_OBJECT_NAME
    || ' SET ';
    OLDLIST :=
    ROWLCR.GET_VALUES ('old');
    -- Generate Update Query
    NEWLIST :=
    ROWLCR.GET_VALUES ('old');
    ISCOMMA := FALSE;
    FOR J IN 1 .. NEWLIST.COUNT
    LOOP
    IF NEWLIST (J) IS NOT NULL
    THEN
    IF J <
    NEWLIST.COUNT
    THEN
    IF ISCOMMA =
    TRUE
    THEN
    UPD_QRY :=
    UPD_QRY
    || ',';
    END IF;
    END IF;
    ISCOMMA := FALSE;
    TYP :=
    NEWLIST
    (J).DATA.GETTYPENAME;
    IF (TYP =
    'SYS.VARCHAR2'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETVARCHAR2
    (DATA1
    IF DATA1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || SUBSTR
    (DATA1,
    0,
    253
    || '''';
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.NUMBER'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETNUMBER
    (NUM1
    IF NUM1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NUM1;
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.DATE'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETDATE
    (DATE1
    IF DATE1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || 'TO_Date( '
    || ''''
    || DATE1
    || ''''
    || ', '''
    || 'DD/MON/YYYY HH:MI:SS AM'')';
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.TIMESTAMP'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETTIMESTAMP
    (TIMESTAMP1
    IF TIMESTAMP1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || TIMESTAMP1
    || '''';
    ISCOMMA :=
    TRUE;
    END IF;
    END IF;
    END IF;
    END LOOP;
    --Setting the where Condition
    UPD_QRY := UPD_QRY || ' WHERE ';
    FOR I IN 1 .. PK_COUNT
    LOOP
    SELECT COLUMN_NAME
    INTO PK_TABLE (I)
    FROM ALL_CONS_COLUMNS COL,
    ALL_CONSTRAINTS CON
    WHERE COL.TABLE_NAME =
    CON.TABLE_NAME
    AND COL.CONSTRAINT_NAME =
    CON.CONSTRAINT_NAME
    AND CON.CONSTRAINT_TYPE =
    'P'
    AND POSITION = I
    AND CON.TABLE_NAME =
    ROWLCR.GET_OBJECT_NAME;
    FOR J IN
    1 .. NEWLIST.COUNT
    LOOP
    IF NEWLIST (J) IS NOT NULL
    THEN
    IF NEWLIST
    (J
    ).COLUMN_NAME =
    PK_TABLE
    (I
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || EQUALS;
    TYP :=
    NEWLIST
    (J
    ).DATA.GETTYPENAME;
    IF (TYP =
    'SYS.VARCHAR2'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETVARCHAR2
    (DATA1
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || SUBSTR
    (DATA1,
    0,
    253
    || '''';
    ELSIF (TYP =
    'SYS.NUMBER'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETNUMBER
    (NUM1
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NUM1;
    END IF;
    IF I <
    PK_COUNT
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' AND ';
    END IF;
    END IF;
    END IF;
    END LOOP;
    END LOOP;
    UPD_QRY := UPD_QRY || ';';
    DBMS_OUTPUT.PUT_LINE (UPD_QRY);
    --Generate Update Query - End
    END LOOP;
    END;

    Thanks for you replies HTH and Dipali.
    I would like to make some points clear from my side based on the issue i have raised.
    1.The No Data Found error is happening on a table for which supplemental logging is enabled.
    2.As per my understanding, the "Apply" process is comparing the existing data in the destination database with the "Old" data in the LCR.
    Once there is a mismatch between these 2, ORA-01403 is thrown. (Please tell me whether my understanding is correct or not)
    3.This mismatch can be on date field or even on the timestamp millisecond as well.
    Now, the point im really wondering about :
    Some how a mismatch got generated in the destination database (Not sure about the reason) and ORA-01403 is thrown.
    If we could update the Destination database with the "Old" data from LCR, this mismatch should be resolved isnt it?
    Reply to you Dipali :
    If nothing is working out, im planning to put a conflict handler for all tables with "OVERWRITE" option. With the following script
    --Generate script for applying Conflict Handler for the Tables for which Supplymentary Logging is enabled
    declare
    count1 number;
    query varchar2(500) := null;
    begin
    for tables in (
    select table_name from user_tables where table_name IN ("NAMES OF TABLES FOR WHICH SUPPLEMENTAL LOGGING IS ENABLED")
    loop
    count1 := 0;
    dbms_output.put_line('DECLARE');
    dbms_output.put_line('cols DBMS_UTILITY.NAME_ARRAY;');
    dbms_output.put_line('BEGIN');
    select max(position) into count1
    from all_cons_columns col, all_constraints con
    where col.table_name = con.table_name
    and col.constraint_name = con.constraint_name
    and con.constraint_type = 'P'
    and con.table_name = tables.table_name;
    for i in 1..count1
    loop
    query := null;
    select 'cols(' || position || ')' || ' := ' || '''' || column_name || ''';'
    into query
    from all_cons_columns col, all_constraints con
    where col.table_name = con.table_name
    and col.constraint_name = con.constraint_name
    and con.constraint_type = 'P'
    and con.table_name = tables.table_name
    and position = i;
    dbms_output.put_line(query);
    end loop;
    dbms_output.put_line('DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(');
    dbms_output.put_line('object_name => ''ICOOWR.' || tables.table_name|| ''',');
    dbms_output.put_line('method_name => ''OVERWRITE'',');
    dbms_output.put_line('resolution_column => ''COLM_NAME'',');
    dbms_output.put_line('column_list => cols);');
    dbms_output.put_line('END;');
    dbms_output.put_line('/');
    dbms_output.put_line('');
    end loop;
    end;
    Reply to u HTH :
    Our Destination database is a replica of the source and no triggers are running on any of these tables.
    This is not the first time im facing this issue. Earlier, we had to take big outage times and clear the Replica database and apply the dump from the source...
    Now i cant think about that situation.

  • Update Statement With Date Field

    I'm trying to run an update statement and I want the date to be updated in the format:
    5/4/2010 12:31:54 PM
    If I run this query on dual it displays correctly: select to_char(sysdate,'DD/MM/YYYY HH12:MI:SS PM') from dual
    If I run this query though on my table I get a 'not a valid month' error.
    UPDATE WR_MEASURE_VALUE SET HOST_CORRECTED_VALUE=35,
    HOST_CORRECTED_DATE=to_char(sysdate,'DD/MM/YYYY HH12:MI:SS PM') WHERE WR_MEASURE_VALUE_OID= 474066
    what am I doing wrong and how can I get my update statement to update the date correctly in the 'DD/MM/YYYY HH12:MI:SS PM' form?
    Thanks
    Guess all I needed to say was HOST_CORRECTED_DATE= SYSDATE
    Thanks anyway
    Edited by: Rich75 on May 5, 2010 7:10 AM

    I want the date to be updated in the format: 5/4/2010 12:31:54 PMDate Formats are only of importance when you select/retrieve the dates.
    As you already understand, you can use TO_CHAR for that.
    If HOST_CORRECTED_DATE is of DATE datatype, then you can simply:
    update wr_measure_value
       set host_corrected_value = 35,
           host_corrected_date  = sysdate
    where wr_measure_value_oid = 474066;
    edit
    I see you already found out yourself ;)
    Edited by: hoek on May 5, 2010 4:15 PM

  • Update statement with inner join issues

    I have searched for the answer on this and not really 100%....so figured I would ask...be nice :)
    what have I done wrong? Or am I just going about this the wrong way? I have looked at the oracle docs and I can't find an example showing me this. I do see where you SET values based on the select query results. I want to update the result of a query based on the join with static values....
    UPDATE table.a
    SET table.a_STATUS=9,table.a.INDEX = 'N'
    WHERE (SELECT table.a INNER JOIN table.b ON (table.a.COMPANY = table.b.COMPANY) AND (table.a.PO_NUMBER =table.b.PO_NUMBER) AND (table.a.PO_RELEASE =table.b.PO_RELEASE) AND (table.a.PO_CODE =table.b.PO_CODE) AND (table.a_STATUS=1) AND (table.b.CLOSED_FL = 'Y'));

    Hi,
    Welcome to the forum!
    user11360811 wrote:
    I have searched for the answer on this and not really 100%....so figured I would ask...be nice :)
    what have I done wrong? Or am I just going about this the wrong way? I have looked at the oracle docs and I can't find an example showing me this. I do see where you SET values based on the select query results. I want to update the result of a query based on the join with static values....
    UPDATE table.aThat's updating a table called A in a schema called TABLE (which is not a good name for any user-named object). Are those really your table and schema names? Perhaps you meant to have an underscore instead of a dot:
    UPDATE  table_ais much, much more reasonable. It means the table name is TABLE_A (a perfectly good name) in the current schema.
    SET table.a_STATUS=9,table.a.INDEX = 'N'
    WHERE ( ...There's a syntax error. You can't just say
    "WHERE (sub-query)"; it has to be
    "WHERE EXISTS (sub-suery)" or
    "WHERE (sub-query) = some_value" or
    "WHERE some_value IN (sub_query)", or something similar. WHERE can never be used without some kind of comparison operator, such as EXISTS, = or IN.
    SELECT table.a INNER JOIN table.b ON ...Here are some more syntax errors. The correct syntax for any query is
    SELECT  column_list
    FROM    table_name ...If table.a is your (first) table name, then you're missing the list of columns to SELECT, and the mandatory keyword FROM.
    (table.a.COMPANY = table.b.COMPANY) AND (table.a.PO_NUMBER =table.b.PO_NUMBER) AND (table.a.PO_RELEASE =table.b.PO_RELEASE) AND (table.a.PO_CODE =table.b.PO_CODE) AND (table.a_STATUS=1) AND (table.b.CLOSED_FL = 'Y'));Some general advice about UPDATE:
    If it's not obvious how to use UPDATE to do what you want, then there's a good chance that UPDATE is the wrong tool for the job. MERGE might be much simpler, and more efficient as well. This is especially likely if you need to join the table that's being updated to some other table.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved. That way, the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    Edited by: Frank Kulash on Jan 17, 2013 4:58 PM

  • NO-DATA-FOUND issue

    Hi all,
    i have the following situation. I'am trying to print NO_DATA_FOUND where the sql statement is returning no rows and I took this approach:
    <?choose:?><?when:ROW/INVOICE_NO!=''?>
    <?for-each-group@section:ROW;./INVOICE_NO?>
    ..............body................
    <?end for-each?>
    <?end when?><?otherwise:?>
    NO_DATA_FOUND
    <?end otherwise?><?end choose?>
    But ther problem is this is not working because of "@section". If I'm removing @section it is working...... but in my case I have to keep "@section" because of the dynamic data from HEADER section.
    Any body knows where is the error or....maybe you know another approach to show that error.
    Marius

    This is the result when I'm looking in Diagnostics:
    <?xml version="1.0" encoding="UTF-8" ?>
    <DATA>
    <NEW_INVOICES>YES</NEW_INVOICES>
    <LIST_ROW />
    </DATA>
    Do you know how to raise the exception NO_DATA_FOUND taking in consideration this output?
    Thank you for any input
    Marius
    Message was edited by:
    user558762

  • Help need with Update statement -Two date columns

    I have two tables rate_change and load ,i want to update the next_rate_change_date and next_rate_change_date columns ,load table has rate_change_effe_term column has value (12) that represents months for each loan,
    i want to take that rate_change_effe_term from load table and add it to min values of rate_chng_effective_date and then update the next_rate_change_date and then continue to do for all the rows of that loan_numer.
    Please see the below sample data.
    Current_data:::
    Loan_number rate_chng_effective_date next_rate_change_date
    111111 02/01/2012 02/01/2014
    111111 03/01/2012 02/01/2014
    111111 06/01/2012 02/01/2014
    111111 07/01/2012 02/01/2014
    111111 08/01/2012 02/01/2014
    Requrired format
    Loan_number rate_chng_effective_date next_rate_change_date
    111111 02/01/2012 02/01/2014
    111111 02/01/2014 02/01/2016
    111111 02/01/2016 02/01/2018
    111111 02/01/2018 02/01/2020
    111111 02/01/2020 02/01/2022
    /* Formatted on 10/24/2012 9:34:23 PM (QP5 v5.227.12220.39724) */
    CREATE TABLE rate_change
       loan_number                NUMBER (10),
       rate_chng_effective_date   VARCHAR2 (20),
       next_rate_change_date      VARCHAR2 (20)
    INSERT INTO rate_change
         VALUES (111111, '02/01/2012', '02/01/2014');
    INSERT INTO rate_change
         VALUES (111111, '03/01/2012', '02/01/2014');
    INSERT INTO rate_change
         VALUES (111111, '06/01/2012', '02/01/2014');
    INSERT INTO rate_change
         VALUES (111111, '07/01/2012', '02/01/2014');
    INSERT INTO rate_change
         VALUES (111111, '08/01/2012', '02/01/2014');
    COMMIT;
    CREATE TABLE Load
       loan_number             NUMBER (10),
       Correct_day             VARCHAR2 (20),
       rate_change_effe_term   VARCHAR2 (20)
    INSERT INTO Load
         VALUES (111111, '02/20/2012', '24');
    INSERT INTO Load
         VALUES (222222, '02/15/2010', '96');
    COMMIT;
    Current_data:::
    Loan_number   rate_chng_effective_date        next_rate_change_date
    111111            02/01/2012                             02/01/2014
    111111            03/01/2012                              02/01/2014
    111111            06/01/2012                             02/01/2014
    111111            07/01/2012                            02/01/2014
    111111            08/01/2012                            02/01/2014
    Requrired format
    Loan_number   rate_chng_effective_date        next_rate_change_date
    111111            02/01/2012                             02/01/2014
    111111            02/01/2014                            02/01/2016
    111111            02/01/2016                             02/01/2018
    111111            02/01/2018                            02/01/2020
    111111            02/01/2020                            02/01/2022
    Any ideas ,suggestion greatly helps . Thank you  very much.

    try with below query.
    update rate_change
    SET rate_chng_effective_date   = To_CHAR(ADD_MONTHS((select MIN(TO_DATE(rate_chng_effective_date,'MM/DD/YYYY'))
                                                          FROM rate_change
                                                          WHERE loan_number = 111111)
                                                          (rownum -1)*(select rate_change_effe_term 
                                                          FROM Load
                                                          WHERE loan_number  =111111) ),'MM/DD/YYYY'  )          
         ,next_rate_change_date      = To_CHAR(ADD_MONTHS((select MIN(TO_DATE(next_rate_change_date,'MM/DD/YYYY'))
                                                          FROM rate_change
                                                          WHERE loan_number = 111111)
                                                          (rownum -1)*(select rate_change_effe_term 
                                                          FROM Load
                                                          WHERE loan_number  =111111) ),'MM/DD/YYYY'  )
    WHERE  loan_number = 111111 ;Thanks,ram

  • Streams apply having 60k no data found error

    We have implemented streams recently. The configuration and streaming is happening fine. The only problem I am having is "NO DATA FOUND" error in apply.
    It's uni-directional streaming
    We are not really updating/deleting/inserting any row on the destination database. (both oracle).
    Why am I seeing 60k Conflicts?
    Is there any configuration am I missing?
    How can I fix the no data found issue and make my stream 100 percent perfect real time.
    Thanks in advance
    Palani

    Print the transaction/LCR using print_transaction/print_lcr. Compare the old values from the LCR to values in destination database table. There must be one or more column values differ. Trace back to the root operation which is causing the value difference and fix it.
    Otherwise you can configure the streams apply process not to compare the old values except keys by using DBMS_APPLY_ADM.COMPARE_OLD_VALUES.

  • No Data Found In APEX report

    Hello All
    I am new to APEX and have a problem. I have created several reports in APEX that allow users to extract data into Excel. However, one report says that No Data is Found in excel although data appears when report is run. Hope I am making my self clear.

    Arie,
    in my case I must have hit a bug (still using Application Express 2.2.1.00.04): I observed this "no data found" issue, and worked around it by just disabling CSV export in the report settings and re-enabling it again afterwards.
    I don't quit understand why we need to apply procedures likes those described in http://htmldb.oracle.com/pls/otn/f?p=31517:117 : shouldn't a CSV export simply work when the corresponding report is non-empty?
    Regards, Thomas

  • Urgent: ORA-01403: no data found Error during Order Import

    Hi Experts,
    I 'am performing order import by populating the order interface tables and then running the order import concurrent program. I 'am encountering the following error while running the order import program:
    No. of orders failed: 1
    "*ora-01403: no data found in package oe_order_pvt procedure lines*"
    Can anyone please provide some pointers on why this is occurring and how this can be overcome. Any pointers on this will be immensely helpful.
    Thanks,
    Ganapathi

    Hi Nagamohan,
    Thanks for your response. I tried calling mo_global.set_policy_context('S', <org_id>) before invoking the concurrent program using fnd_request.submit_request(...); But, this still does n't seem to prevent the No data found issue.
    One more thing that I noticed is, this is happening while importing the customer along with the order. I 've ensured that I use the same org_id for the customer data as well. Can you please let me know whether there is anything else that I should check for.
    Thanks,
    Ganapathi

  • ISupport "Contact Us" loads with No Data Found

    We are using 11.5.10.2 and when users log into the iSupport Individual User responsibility homepage and click on the "Contact Us" link, the page loads but there is no content. They are presented with a message that states:
    >>No data found. Please enter initial values.<<
    Where do I enter these initial values?
    Thanks

    We are using 11.5.10.2 and when users log into the iSupport Individual User responsibility homepage and click on the "Contact Us" link, the page loads but there is no content. They are presented with a message that states:
    >>No data found. Please enter initial values.<<
    Where do I enter these initial values?
    Thanks

  • ORA-01403: No data found (Occured in UPDATE Statement)

    Dear All,
    I am getting No data found error while executing the following UPDATE statement.
    UPDATE DEAL
    SET CLIENT_CD = 'HDMJARVN'
    WHERE CA_REF_NO = 70728
    AND CLIENT_CD = 'HDMJARVI';
    Wheareas
    SELECT *
    FROM DEAL
    WHERE CA_REF_NO = 70728
    AND CLIENT_CD = 'HDMJARVI';
    Gives me 1 row.
    Please explain.....
    Thanks in Advance.

    UPDATE DEAL
    t line 1:
    ORA-01403: no data foundHi Yogesh,
    I created a trigger on a table "CHILD" which fires during UPDATE statement. As you may notice, the trigger raises "no data found" exception which is not handled as a result the update ends up with an error.
    Similar is your case, investigate the trigger to resolve the issue.
    SQL> desc child
    Name                                      Null?    Type
    B                                                  NUMBER
    SQL> create or replace trigger child_trig
      2  after update of b on child
      3  referencing old as old new as new
      4  for each row
      5  declare
      6    l_dummy number;
      7  begin
      8    select 1 into l_dummy from dual where dummy = 'TEST';
      9  end;
    10  /
    Trigger created.
    SQL> select * from child;
             B
             1
    SQL> update child set b = 5;
    update child set b = 5
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "TEST.CHILD_TRIG", line 4
    ORA-04088: error during execution of trigger 'TEST.CHILD_TRIG'
    SQL>Regards

  • No Data Found Exception in bulk updates

    I am trying to catch no data found exception in bulk updates when it does not find a record to update in the forall loop.
    OPEN casualty;
    LOOP
    FETCH casulaty
    BULK COLLECT INTO v_cas,v_adj,v_nbr
    LIMIT 10000;
    FORALL i IN 1..v_cas.count
    UPDATE tpl_casualty
         set casualty_amt = (select amt from tpl_adjustment where cas_adj = v_adj(i))
         where cas_nbr = v_nbr(i);
    EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('exception')
    I get this error at the line where i have exception:
    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
    begin case declare end exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    Can someone pls direct me on how to get around this?
    If I do not handle this exception, the script fails when it attempts to update a record that does not exist and the error says : no data found exception.
    Thanks for your help.
    Edited by: user8848256 on Nov 13, 2009 6:15 PM

    No Data Found isn't an exception raised when an UPDATE cannot find any records to process.
    SQL%ROWCOUNT can be used to determine the number of rows affected by an update statement, but if 0 rows are updated then no exception will be raised (it's just not how things work).
    If you post your actual CURSOR (casualty) declaration, it's quite possible we can help you create a single SQL statement to meet your requirement (a single SQL will be faster than your current implementation).
    Have you looked in to using the MERGE command?

  • No data found in Update (streams replication)

    Hi,
    Our database is setup for streams replication of few tables from source database DB1 to destination database DB2. The source tables have different primary key columns than the primary key columns at destination. All tables at source and destination have primary keys, unique keys and foreign keys. There are unique keys on source tables which are used as primary keys on destination. For example, table TAB1 at source DB1 has primary key column COL1 and unique key column COL2. Whereas at destination table TAB1 on DB2 has COL2 as primary key and COL1 is dropped from the LCR.
    We have problem now, inserts are replicated perfectly, but not updates. Updates are giving “no data found” error. I went through the oracle documentation and I tried following:
    1.     Setting keys using DBMS_APPLY_ADM.SET_KEY_COLUMNS. It didn’t work. Unique key column was set as key columns.
    2.     Setting update conflict handler using DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER. It didn’t work. Unique key column was set as resolution_column and “DISCARD” as method_name (parameters).
    Is there anything I am missing? Please help me in resolving this error. If you have any leads or sample code would help me greatly. Appreciated your help.
    Thanks

    Thanks for our time and help. Yes, you are right.
    FYI... we had supplemental logging. Our team tried with different configuration combinations yesterday. Finally, we found that unconditional supplemental logging must be there to resolve the issue. We had conditional supplemental logging thou. After changing it to unconditional, it was working. There is no need for update conflict handlers or substitute keys.
    Thanks

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • Performance Issue: Update Statement

    Hi Team,
    My current environment is Oracle 11g Rac...
    My application team is executing a update statement (ofcourse it is there daily activity) ...
    updating rows of 1 lac, daily it takes about 3-4 minutes to run the statement.
    But today its taking more time i.e more than 8 hours.
    then I have generated the explain plan of the update statement and found that its taking full table scan.
    Kindly assist me in fixing the issue by letting me know where and how to look for the problem.
    **Note: Stats gather is updated
    Thanks in advance.
    Regards

    If you notice there are no indexes to the below update statement -
    UPDATE REMEDY_JOURNALS_FACT SET JNL_CREATED_BY_IDENTITY_KEY = ?, JNL_CREATED_BY_HR_KEY = ?, JNL_CREATED_BY_NTWRK_KEY = ?, JNL_MODIFIED_BY_IDENTITY_KEY = ?, JNL_MODIFIED_BY_HR_KEY = ?, JNL_MODIFIED_BY_NTWRK_KEY = ?, JNL_ASSGN_TO_IDENTITY_KEY = ?, JNL_ASSGN_TO_HR_KEY = ?, JNL_ASSGN_TO_NTWRK_KEY = ?, JNL_REMEDY_STATUS_KEY = ?, JOURNALID = ?, JNL_DATE_CREATED = ?, JNL_DATE_MODIFIED = ?, ENTRYTYPE = ?, TMPTEMPDATETIME1 = ?, RELATEDFORMNAME = ?, RELATED_RECORDID = ?, RELATEDFORMKEYWORD = ?, TMPRELATEDRECORDID = ?, ACCESS_X = ?, JOURNAL_TEXT = ?, DATE_X = ?, SHORTDESCRIPTION = ?, TMPCREATEDBY = ?, TMPCREATE_DATE = ?, TMPLASTMODIFIEDBY = ?, TMPMODIFIEDDATE = ?, TMPJOURNALID = ?, JNL_JOURNALTYPE = ?, COPIEDTOWORKLOG = ?, PRIVATE = ?, RELATEDKEYSTONEID = ?, URLLOCATION = ?, ASSIGNEEGROUP = ?, LAST_UPDATE_DT = ? WHERE REMEDY_JOURNALS_KEY = ?
    Explain Plan -
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | UPDATE STATEMENT | | | | 1055 (100)| | | | | | |
    | 1 | UPDATE | REMEDY_JOURNALS_FACT | | | | | | | | | |
    | 2 | PX COORDINATOR | | | | | | | | | | |
    | 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | 784 | 1055 (1)| 00:00:05 | | | Q1,00 | P->S | QC (RAND) |
    | 4 | PX BLOCK ITERATOR | | 1 | 784 | 1055 (1)| 00:00:05 | 1 | 10 | Q1,00 | PCWC | |
    |* 5 | TABLE ACCESS STORAGE FULL| REMEDY_JOURNALS_FACT | 1 | 784 | 1055 (1)| 00:00:05 | 1 | 10 | Q1,00 | PCWP | |
    Predicate Information (identified by operation id):
    5 - storage(:Z>=:Z AND :Z<=:Z AND "REMEDY_JOURNALS_KEY"=:36) filter("REMEDY_JOURNALS_KEY"=:36)
    Note
    - automatic DOP: skipped because of IO calibrate statistics are missing
    Edited by: GeetaM on Aug 17, 2012 2:18 PM

Maybe you are looking for

  • How do I use a drop-down list to populate a list box

    I'm using livecycle 8: I basically have a drop down list with many selections available. I want the function to be when they select from the drop-down the choice they made appears in a list box next to the drop-down box. If they choose to add additio

  • How do I insert a blank page if my group ends on an odd-numbered page

    I have a report that prints out information for 10 regions. We print this report double-sided and put it into a 3-ring binder with 10 divider tabs, one for each region. If the last page for a particular region is an even-numbered page, then everythin

  • Achieving tallied Business area wise

    HI, Achieving tallied Business area wise trial balance required.Can any body help in this regards.

  • HR MASTER DATA FOR PP

    Dear all, I am using PP transaction "CO11" for production order confirmation. In that i want to use Personnel/additional data of HR. How to configure this in HR module? I want to make use of only personnel no, name of HR master--- in PP for operator'

  • CS 5.5 Web Premium : installation et mot de passe ID Adobe

    Bonjour, Je viens de modifier mon mot de passe mais celui-ci, alors qu'il est accepté sur le site abode.com, n'est pas valide dans la procédure d'installation de CS 5.5 Web Premium où il est limité à 12 caractères (le mien est donc trop long). Pas de