How to avoid: ORA-01403 no data found AND ORA-00001

Hi,
below my code:
CREATE TABLE TAB_TO_EM
  EM_NUMBER           VARCHAR2(32),
  NAME_FIRST       VARCHAR2(32),
  NAME_LAST        VARCHAR2(32),
  MAILBOX            VARCHAR2(32)
ALTER TABLE TAB_TO_EM
ADD (CONSTRAINT PK_EM_NUMBER PRIMARY KEY (EM_NUMBER));
CREATE TABLE EM
  EM_ID            VARCHAR2(32),
  EM_NUMBER           VARCHAR2(32),
  NAME_FIRST       VARCHAR2(32),
  NAME_LAST        VARCHAR2(32),
  EMAIL            VARCHAR2(32)
ALTER TABLE EM
ADD (CONSTRAINT PK_EM_ID PRIMARY KEY (EM_ID));THE PRIMARY KEY EM_ID COMES FROM THE TAB_TO_EM TABLE LINKED IN THIS WAY:
NAME_LAST||'_'||SUBSTR(NAME_FIRST,1,3)||'_'||SUBSTR(EM_NUMBER,-2)
I created this procedure to insert a new EM_NUMBER into EM table:
CREATE OR REPLACE PROCEDURE INS_NEW_RECORD IS
ERR_NUM                          NUMBER;
ERR_MSG                          VARCHAR2(300);
V_COUNT                          NUMBER;
V_EM_ID                          VARCHAR2(64);
      CURSOR A IS
      SELECT A.EM_NUMBER, A.NAME_FIRST, A.NAME_LAST, A.MAILBOX
      FROM TAB_TO_EM A;
BEGIN
      FOR CUR_A IN A
  LOOP
             SELECT COUNT(*)
             INTO V_COUNT
             FROM EM2 B
             WHERE B.EM_NUMBER=CUR_A.EM_NUMBER;
             IF V_COUNT = 0 THEN
             -- here insert a new record
                          INSERT INTO EM2 (EM_ID, EM_NUMBER, NAME_FIRST,NAME_LAST, EMAIL)
                          VALUES (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2),
                          CUR_A.EM_NUMBER, CUR_A.NAME_FIRST,CUR_A.NAME_LAST, CUR_A.MAILBOX);
             END IF;
  END LOOP;
END INS_NEW_RECORD;Example of my table:
Insert into TAB_TO_EM
   (EM_NUMBER, NAME_FIRST, NAME_LAST, MAILBOX)
Values
   ('22333', 'AAAA', 'BBBB', 'XXXX');
Insert into TAB_TO_EM
   (EM_NUMBER, NAME_FIRST, NAME_LAST, MAILBOX)
Values
   ('11222', 'AAAA', 'BBBB', 'XXXX');
Insert into TAB_TO_EM
   (EM_NUMBER, NAME_FIRST, NAME_LAST, MAILBOX)
Values
   ('00122', 'AAAA', 'BBBB', 'XXXX');
commit;
execute INS_NEW_RECORD;
ORA-00001: ORA-00001: unique constraint violated (PK_EM_ID)
ORA-06512: a "INS_NEW_RECORD", line 25
ORA-06512: a line 2I tried to modify my procedure:
CREATE SEQUENCE AFM.SEQ_EM_ID
  START WITH 1
  MAXVALUE 999999999999999999999999999
  MINVALUE 1
  NOCYCLE
  NOCACHE
  ORDER;
IF V_COUNT = 0 THEN
       --verify duplicate pkey
             SELECT (NAME_LAST||'_'||SUBSTR(NAME_FIRST,1,3)||SUBSTR(EM_NUMBER,-2))
             INTO V_EM_ID
             FROM EM B
             WHERE (NAME_LAST||'_'||SUBSTR(NAME_FIRST,1,3)||SUBSTR(EM_NUMBER,-2)) = (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2))
             AND ROWNUM=1;
             IF V_EM_ID = (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2)) THEN
                      INSERT INTO EM2 (EM_ID, EM_NUMBER, NAME_FIRST,NAME_LAST, EMAIL)
                      VALUES (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2)||'_'||SUBSTR ('000' || SEQ_EM_ID.NEXTVAL, -3),
                      CUR_A.EM_NUMBER, CUR_A.NAME_FIRST,CUR_A.NAME_LAST, CUR_A.MAILBOX);
             ELSE
                          INSERT INTO EM2 (EM_ID, EM_NUMBER, NAME_FIRST,NAME_LAST, EMAIL)
                          VALUES (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2),
                          CUR_A.EM_NUMBER, CUR_A.NAME_FIRST,CUR_A.NAME_LAST, CUR_A.MAILBOX);
             END IF;
      END IF;
execute INS_NEW_RECORD;
ORA-01403 no data foundI'd like to create a stored procedure with these conditions:
IF em_id is duplicate insert new em_id= (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2)||'_'||SUBSTR ('000' || SEQ_EM_ID.NEXTVAL, -3)
ELSE em_id= (CUR_A.NAME_LAST||'_'||SUBSTR(CUR_A.NAME_FIRST,1,3)||SUBSTR(CUR_A.EM_NUMBER,-2)
How can I write my procedure correctly?
Thanks in advance!

1) What are you expecting this piece of code to do?
             SELECT COUNT(*)
             INTO V_COUNT
             FROM EM B
             WHERE B.EM_NUMBER=CUR_A.EM_NUMBER;My answer would be that i expect it to do nothing (unless i've misunderstood what you're doing up until now). You are making a new type of key in the EM table by frankensteining data elements from your tab_to_em table, so i would expect that code to always return 0. By the way, that's what we have a dup_val_on_index catch for, no need to read the table, you try your insert, if you dup a value, you take appropriate action.
I guess the best way to proceed based on what you've provided would be 2 SQL statements.
1) insert records where you cannot find a match in the target table
2) insert records where you CAN find a match in the target table
INSERT INTO EM (EM_ID, EM_NUMBER, NAME_FIRST,NAME_LAST, EMAIL)
select
  A.NAME_LAST||'_'||SUBSTR(A.NAME_FIRST,1,3)||SUBSTR(A.EM_NUMBER,-2),
  A.EM_NUMBER,
  A.NAME_FIRST,
  A.NAME_LAST,
  A.MAILBOX
from tab_to_em a
where not exists
  select null
  from em b
  where b.NAME_LAST||'_'||SUBSTR(b.NAME_FIRST,1,3)||SUBSTR(b.EM_NUMBER,-2) = a.em_number
INSERT INTO EM (EM_ID, EM_NUMBER, NAME_FIRST,NAME_LAST, EMAIL)
select
  A..NAME_LAST||'_'||SUBSTR(A..NAME_FIRST,1,3)||SUBSTR(A..EM_NUMBER,-2)'_'||SUBSTR ('000' || SEQ_EM_ID.NEXTVAL, -3),
  A.EM_NUMBER,
  A.NAME_FIRST,
  A.NAME_LAST,
  A.MAILBOX
from tab_to_em a
where exists
  select null
  from em b
  where b.NAME_LAST||'_'||SUBSTR(b.NAME_FIRST,1,3)||SUBSTR(b.EM_NUMBER,-2) = a.em_number
);This comes with the caveat that what you are doing is a REALLY bad idea. Really really really bad idea.
The baddies are
1) your choice for a 'primary key'
2) using a sequence and then substring it
3) this is from a business perspective, storing the same person multiple times!
Now, i don't know your system or requirements, but i am speaking in general terms here, this seems like a all around bad idea and i would suggest you revisit the design.

Similar Messages

  • Update conflict resoltion ORA-01403: no data found

    I have set up multimaster replication environment with two database and I have implemented Update conflict resolution on a table using DISCARD method(Oracle provided) as below.
    Some how it is not able to resolve the conflict and I am getting erro ORA-01403: no data found.
    On MDS(M1) I run the follwing SQL
    update menu_code
    set ipp_uid = 20
    where id = 4;
    commit;
    on master(M2) database in table menu_code row with ID=4 doesn't exsit.
    When I apply deffred transaction that gnerated by above SQL
    I get ORA-01403: no data found and ofcourse trnsaction doesn't apply to db and goes to deferror. Since I am using DISCARD method
    it should be resolved and not to gnerate error message.
    Here is detail info.
    Table name: menu_code
    --creating column group
    BEGIN
    DBMS_REPCAT.MAKE_COLUMN_GROUP (
    sname => 'SYNAPSE',
    oname => 'MENU_CODE',
    column_group => 'MENU_CODE_CG1',
    list_of_column_names => 'id,ipp_uid');
    END;
    -- adding update conflict resolution
    BEGIN
    DBMS_REPCAT.ADD_UPDATE_RESOLUTION (
    sname => 'SYNAPSE',
    oname => 'MENU_CODE',
    column_group => 'MENU_CODE_CG1',
    sequence_no => 1,
    method => 'DISCARD',
    parameter_column_name => 'id,ipp_uid');
    END;
    --regenerating support for the table.
    BEGIN
    DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
    sname => 'SYNAPSE',
    oname => 'MENU_CODE',
    type => 'TABLE',
    min_communication => TRUE);
    END;
    Thanks.
    Pravin

    You are absolutely right. Now we decided not to write any conflict resolution routine at all.
    Non MDS database is read-only till fail over. After fail over non MDS (other master) will allow insert/update operation.
    To fail back to MDS we will write our procedure/function, out side of Oracle conflict resolution( both database will be in Read only mode during synchronizing).
    We will delete all deferred transaction/error form the queue and once data transfer is complete, again MDS becomes primary database to use.
    Oracle conflict resolutions are to complicated and has lots of overhead and maintenance.
    Thanks.
    Pravin

  • ORA-01403: no data found  in apply at bi -direction stream

    Hi Experts,
    we use 10g at window for bi direaction.
    after building, I got ORA-01403: no data found in apply process. I check these error LCR
    that invloved DML action for different tables in source database.
    our stream a schema level capture and no error handle as well as other exception.
    former DBA set up this tream.
    I just check online got these info.
    ORA-01403 No Data Found
    An ORA-01403 error message is generated when an Apply process tries to update an existing row and the old_values in the row LCR do not match the current values at this destination database object.
    This situation could arise on account of any of the situations below:
    Supplemental logging is not specified for columns that require supplemental logging at the source database. In this case, LCRs from the source database may not contain values for key columns.
    There may be a problem with primary key in the destination table. If no primary key exists for the table or if the target table has a different primary key than the source table, substitute key columns can be specified using the set_key_columns procedure in the dbms_apply_adm package. Error ORA-23416 may be encountered if a table being applied does not have a primary key.
    There is a data mismatch between a row LCR and the table for which the LCR is applying a change. In this case, the destination has to be updated to match the data values before the error transaction can be executed again.
    what do i need to do?
    Thanks,
    Jim

    It will be wise to run the Oracle supply streams health check script to check your existing streams environment.
    From the result, you can also open a tar with Oracle to see if they can help you with the setup.
    In addition to the ORA-01403 error, you can also run some of the Oracle Streams packages (Managing Apply Errors) to see the full detail of what is missing that caused the Ora-01403 error.
    I will also try to implement a smoke test using the simple heartbeat table suggested by Oracle Streams, if that is working, then you can begin your full scale setup in your environment knowing that the base Streams Structure is setup correctly.
    HTH

  • ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate

    ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate a form.
    1) Created a FORM on EMP using the wizards. This creates an AUTOMATIC ROW FETCH
    TABLE NAME - EMP
    Item Containing PRIMARY KEY - P2099_EMPNO
    Primary key column - EMPNO
    By default the automatic fetch has a ‘Process Error Message’ of ‘Unable to fetch row.’
    2) Created a HTML region. Within this region add
    text item P2099_FIND_EMPNO
    Button GET_EMP to submit
    Branch Modified the conditional branch created during button creation to set P2099_EMPNO with &P2099_FIND_EMPNO.
    If I then run the page, enter an existing employee number into P2099_EMPNO and press the GET_EMP button the form is populated correctly. But if I enter an employee that does not exist then I get the oracle error ORA-01403: no data found and no form displayed but a message at the top of the page ‘Action Processed’.I was expecting a blank form to be displayed with the message ‘Unable to fetch row.’
    I can work around this by making the automated fetch conditional so that it checks the row exists first. Modify the Fetch row from EMP automated fetch so that it is conditional
    EXIST (SQL query returns at least one row)
    select 'x'
    from EMP
    where EMPNO = :P2099_EMPNO
    But this means that when the employee exists I must be fetching from the DB twice, once for the condition and then again for the actual row fetch.
    Rather than the above work around is there something I can change so I don’t get the Oracle error? I’m now wondering if the automatic row fetch is only supposed to be used when linking a report to a form and that I should be writing the fetch process manually. The reason I haven’t at the moment is I’m trying to stick with the automatic wizard generation as much as I can.
    Any ideas?
    Thanks Pete

    Hi Mike,
    I've tried doing that but it doesn't seem to make any difference. If I turn debug on it shows below.
    0.05: Computation point: AFTER_HEADER
    0.05: Processing point: AFTER_HEADER
    0.05: ...Process "Fetch Row from EMP": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:EMP:P2099_EMPNO:EMPNO
    0.05: Show ERROR page...
    0.05: Performing rollback...
    0.05: Processing point: AFTER_ERROR_HEADER
    I don't really wan't the error page, either nothing with the form not being populated or a message at the top of the page.
    Thanks Pete

  • APEX.AUTHENTICATION.SESSION_VERIFY_FUNCTION - ORA-01403: no data found

    Hi,
    I'm deploying an APEX app with user general identified users (like user1, user2, and so).
    Now in this stage of implementation, we created user groups and user, but when I migrate the app from dev to production, all the new users that we created in the prod environment, when they try to log in, the app sends the error "APEX.AUTHENTICATION.SESSION_VERIFY_FUNCTION - ORA-01403: no data found" and the users cant't access the app.
    We have triple-checked all the variables buyt can't find the error from our side.
    Any help would by highly appreciate
    Thanks in advance,
    Agustin.

    Hi Hari,
    I'm just checking my Ayuthentication Scheme (instead of my Authorization scheme) and it seems to be the origin of the "no_data_found" message.
    The thing is that we make a Validation against one internal user table wich defines the office where the user work. That table had the username in lowercases and even the user wrote its username in the login page, using lowercases, the SELECT returned an "no_data_found".
    If the username field in our table is un UPPERCASE, the same function, typing the username in lowercase, returns OK.
    Thanks a lot for your interest
    Agustin

  • How to resolve "ORA-01403: no data found"

    When i attempt to delete from a table on which an after delete trigger is defined, i get exception as follows;
    OracleException was unhadled by user code:
    ORA-01403: no data found
    ORA-06512: at "...TRIGGER_KATILIMEKLE", line11
    ORA-04088: error during the execution of trigger '...TRIGGER_KATILIMEKLE'
    Here is my trigger:
    Note: Before i added block -ELSIF DELETING THEN- it was working fine, yet now it throws that exception somehow. Since i am not new to oracle, i just couldn't figure out. Thanks...
    CREATE OR REPLACE TRIGGER TRIGGER_KATILIMEKLE AFTER INSERT OR DELETE ON IHALE_KATILINANIHALEDETAY
    REFERENCING NEW AS newRow
    FOR EACH ROW
    DECLARE
    srktkodu number;
    ihlkodu number;
    BEGIN
    IF INSERTING THEN
    select t2.srktkodu, t2.ihlkodu into srktkodu,ihlkodu from ihale_katilinanihale t2 where t2.detaykod=:newRow.detaykod;
    INSERT INTO ihale_katilimcilar t (t.aktif, t.SRKTKODU,t.ihlkodu,t.ihlaltktgkodu) VALUES('0', srktkodu, ihlkodu, :newRow.IHLALTKTGKODU);
    ELSIF DELETING THEN
    select t2.srktkodu, t2.ihlkodu into srktkodu,ihlkodu from ihale_katilinanihale t2 where t2.detaykod=:newRow.detaykod;
    DELETE FROM ihale_katilimcilar t WHERE t.srktkodu=srktkodu and t.ihlkodu=ihlkodu and t.ihlaltktgkodu=:newRow.IHLALTKTGKODU;
    END IF;
    END TRIGGER_KATILIMEKLE;
    Message was edited by:
    user611878

    REFERENCING NEW AS newRow
    ELSIF DELETING THEN
    ...=:newRow.detaykod;Please read about [url
    http://download.oracle.com/docs/cd/B10501_01/appdev.92
    0/a96590/adg13trg.htm#590]Accessing Column Values in
    Row Triggers in the manual.Thanks a lot.
    Using REFERENCING NEW AS newRow and OLD AS oldRow and ...=:oldRow.detaykod; I handled it, however it just doesn't assign other parameters in delete query, thus it deletes only when t.ihlaltktgkodu=:oldRow.IHLALTKTGKODU; in the delete query and ,gnore the rest.
    Although i assign the values of the parameters -srktkodu,ihlkodu- and make an successfull insert in the insert query, i just cannot in the delete. Why?
    Right here :
    select t2.srktkodu, t2.ihlkodu into srktkodu,ihlkodu from ihale_katilinanihale t2 where t2.detaykod=:oldRow.detaykod;
    DELETE FROM ihale_katilimcilar t WHERE t.srktkodu=srktkodu and t.ihlkodu=ihlkodu and t.ihlaltktgkodu=:oldRow.IHLALTKTGKODU;

  • I am getting ORA-01403: no data found error while calling a stored procedur

    Hi, I have a stored procedure. When I execute it from Toad it is successfull.
    But when I call that from my java function it gives me ORA-01403: no data found error -
    My code is like this -
    SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
    UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
    UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND     UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
         IF L_N_CNT >0 THEN
              DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
              SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
              RETURN;
         ELSE
              DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
              INSERT INTO TLSI_SI_MAST
                   (     CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
                        ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
                        CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
                        POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
                        PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
                        MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
                        NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
                        NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
                        NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
                        NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
                        VALUES(     R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
                        R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
                        R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN,     R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
                        R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
                        R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
                        R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
                        R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
                        R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
                        SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
                        DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
         END IF;

    Hi,
    I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
    Regards, Gerwin

  • HELP!! Create source system failed in BW ( ORA-01403: no data found)

    Hi,
    I cannot create Oracle DB as a source system in my BW (7.01).
    In system log, I got the following information.
    ============================
    Database error 1403 at CON
    > ORA-01403: no data found
    ============================
    How can I fix this issue?
    It's kind of urgent.
    Thanks!
    Regards,
    Steven
    Edited by: Wen Steven on Sep 30, 2011 6:09 PM

    Hi Steven,
    Please check the below thread
    SQL/Buffer trace RC=1403
    Regards,
    Venkatesh

  • Problem with new DB app, report+form, report works great, form says ORA-01403: no data found

    I have a new table, the PK is a varchar2(5) column, when I allow the default query in the report to do its work, I get all the expected data.  when I click on the edit icon (pencil), I get an error screen indicating ORA-01403: no data found.  I'm hosed!  This was generated by the app!  no changes were made to anything in the app, except to turn off tabs at create time.  I even left the default name.
    My ARF is hitting the right table with the PK column, but finds nothing.  I have the "success" message showing me the PK value.  What could be going on here, and how can it be addressed?  Today is the 1st time I have seen this matter.
    I'm running 4.22 as the workspace admin, I have other apps that work fine (to expectation), my browser is FF22, though I plan a downgrade to 18.  Our DB is 11.1.0.7.

    Jorge, thanks for your attention to my problem, I appreciate any insights, although there is a little clarification I can offer.  Also, if you can, please remind me the tags to use in my text that would properly set off the code snippets or prior message content?
    [you wrote]
    You said you have a "success" message showing you the PK value. Can you elaborate on this?
    The form page, under the ARF, allows for the display of a "success" message and a "failure" message.  I have seen my "success" message appear, but it didn't show my key field as a brought-back value (which I told it to include), and I think now this is not relevant any longer.  I found that there was a link on the report attributes page between #ROWID# and a P2_ROWID that was incorrect (probably from an earlier stage of dev in the app), and I changed this to my key field, and this altered the outcome of the ARF action.  This leads to ....
    [you wrote]
    Can you see the correct PK value in the URL? Does the item parameter match what you expect (correct page item and value)? Perhaps share that full URL here?
    I have expected values in my URL.  The URL does show my key value (tail end of URL underlined here):
    ../apex/f?p=120:2:7519563874482::NO::P2_VCODE:RB15
    [you wrote]
    Debug the page and see which process, item or step is actually failing. You could be running some other process on the form page and that could be what actually fails.  Treat it as if the ARF works correctly and see what else could be happening.
    I can add the detail that my 1st message was based on testing with a table where I set the PK as data type VARCHAR2, but in more testing on the actual app (whose URL piece is above) I am using a PK which is CHAR.
    The result of the debug effort is that APEX has built its own query for pulling back the row in the ARF, and it is joining on my PK field to an APEX item P_ROWID which I don't think I created.  Nor does it appear to offer me any avenue for correcting it.    debug snippet:    where "VCODE" = :p_rowid; end;

  • 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

  • ORA-01403: no data found when calling a web service from HTMLDB

    I am working through Section 6 How to Implement a Web Service of the HTML DB 2 Day Developer tutorial. I can get the first example to work but not the second one. I am able to add the web reference and create the form and report. However, when I run the page and click submit, I get ORA-01403: no data found.
    When I test the service, this is what shows in the Message Request:
    <?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header><namesp1:Header xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Username xsi:type="xsd:string"></namesp1:Username><namesp1:Password xsi:type="xsd:string"></namesp1:Password><namesp1:Tracer xsi:type="xsd:string"></namesp1:Tracer></namesp1:Header></SOAP-ENV:Header><SOAP-ENV:Body><namesp1:ListFuturesByExchange xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Exchange xsi:type="xsd:string">NYMEX</namesp1:Exchange></namesp1:ListFuturesByExchange></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Nothing shows in the Message Response.
    I have also tried to call a simple web service that I created in .NET. It exhibits the same behavior. I am able to add the reference and create the form. But when I click the submit button, I get ORA-01403: no data found.
    Windows 2000
    HTMLDB 2.0.0.00.49
    Oracle9i 9.2.0.6.0
    Any help will be greatly appreciated.

    I'm having a similar problem!, Although, distressing as it is to observe the lack of response this thread has had for 9 months, I'm still seeking help here!
    I created a web service reference according to the following WSDL : "http://OgAppExpress:[email protected]:5555/invoke/OgAdminUtils.pub:WSDL_HLR" (operation name="getSubscriberInfoByMSISDN") and a form on that web service, all of which went very nicely. But! When I ran the form, inserted the value ("3546933599") into the parameter and pressed submit.... => "ORA-01403: no data found"
    The debug action displays very limited information and sheds no light on the problem :( Multiple attempts, on recreating the project from scratch, have resulted in the same utter failure! Needless to say, this nulls the affect of my Prozac proscription....
    Is there anybody out there who can help me and defend APEX's reputation?

  • Unable to open SO Form - ORA-01403: No data found error

    Hi All,
    I have created a new OU, a new INV org & sub-inventories under it in the Vision Instance 11.5.10.2. I have linked this OU to the existing LE - Vision Operation & SOB - Vision Operations.
    Then, I have created a new OM responsibility just like OM SuperUser responsibility & have set the MO: Operating Unit profile option to the newly created OU at the responsibility level & finally ran the Replicate Seed Data program for this OU as the parameter.
    When I navigate to the new responsibility & try to open on the Sales Order form, i'm getting an error as "ORA-01403 : no data found in the Package OE_Order_Cache Procedure Load_Set_Of_Books" & the SO form doesn't open at all.
    Can anyone please guide me how to resolve this issue or is there any set-up that I'm missing? The package & package body OE_ORDER_CACHE is 'VALID' in the database.
    Regards,
    Hemanth

    Hi Hemanth,
    Hope by now ur issue is resolved.
    If not pls check the following.
    Pls check all the profile options
    GL set of books
    Mo operating unit
    These are mandatory.
    Apart from that check whether u have set the system parameters in OM and AR.
    If these parameters are not set u cannot open the sales order form.
    Pls check this.
    Regards,
    Madhu

  • Misterious "ORA-01403: no data found" error

    Hi,
    I've been searching through the forum and the Internet with no results, so I'm posting here hoping you can help me.
    Here is the situation: I had a page 30 with a tree branching to a form on a view.This worked fine until one day that suddenly, we got the "ORA-01403: no data found" error when loading the page. I guess that's normal, since the form shows the data filtered in the tree (in the tree we click on an element and pass its ROWID to the form), and when we load the page no ROWID is selected. So, the first question would be, how can I manage this situation? My first option was to have a condition in the Automatic Fetch for the Form, so that it's executed only when the ROWID item is not null. It worked a couple of times. After a while, it crashed again.
    Tired of trying things, we decided to copy this page 30 to another page (page #80). Surprisingly, page #80 worked meanwhile #30 crashed. And they are completely the same, the data has not changed either.
    Could it be that page #30 somehow is corrupted? It's really strange that the same exact copy of the page works with one ID but not with another one.
    Has someone experienced this situation? it makes me feel like the app is unsecure and unstable. Any ideas, please?
    Apex version: 4.1.1 on APEX listener.
    Thanks,
    Elena.

    fac586 wrote:
    Elena.mtc wrote:
    Thanks for your response. The form is a single row (a form on a table or view). Here is what I've found out thanks to your tips:
    It affects to all the three users that I have access with.Try it with a new user that has never accessed the page before.
    I used the debug mode (new to me, so I'm kind of slow on this, still) and wrote an exception message on the Automatic Fetch Row and I managed to know the ROWID that the fetch process is using in the where clause. Of course this ROWID does not exist in the table, so the first question that comes to my mind is "how come and from where is the page getting this ROWID?". I don't know and can't comment because I can't see the app. ;-)
    If the ROWID is stored in an item, check the Maintain session state property isn't set to Per User.I changed this and seemed to work. But it crashed later. I made a computation process to set to null the rowid's when loading the page. After reset, I deleted the computations (due to application functionality) and it worked. However, I do not trust this page anymore. So we created a new fresh app and copied this page. Luckily we are on development environment :)
    >
    So, I made a computation to initialize to null the item that saves the ROWID, and now it worked.
    This page that I'm testing on is #30, but the valid page is #80 (it has changes made on the look and feel of the page). So, I deleted page #30, and copied page #80 (which works perfectly) into #30. And it crashes again (obvius, since it doesn't have the computation that gives null to the rowid item). What's "interesting" is that I still see the exception message I wrote in the older version of page #30. So, it seems that some values need to be purged and that the delete is not clean, but how? I'm not entirely clear on what you've been doing there, but it does indeed all sound rather odd.
    I suspect that you wouldn't be able to reproduce this problem on apex.oracle.com. However, it would probably be helpful if you could upload the app and provide developer credentials to the workspace so we could see how it works and if there's anything obvious (or not) that might cause this problem.Unluckily I cannot do this. Thank you anyway for the help, it's hard to explain when something so weird happens.
    Thanks!
    Elena.

  • Deferred transaction fails due to a "ORA-01403: no data found" error

    I recently acticated replication between two Oracle instances.
    (one being the master definition site and the other one being
    a second master site).
    Everything was going well until two weeks ago, when i realized
    that some datas were different between the two Oracle instances.
    I tried to figure out why and found that some deferred transation
    failed to propagate due to a "ORA-01403: no data found" error.
    Not all transaction fail, only a few.
    All the errors are stored in the DEFERROR table of the second
    master site, the DEFERROR table is empty in the master definition
    site.
    For every error, the source is the master definition site and the
    destination is the second master site, which is OK because the
    second master site is supposed to be "read-only". But why are the
    errors stored in the DEFERROR table of the second master site
    (and not in the master definition site (the source)).
    Most errors occur on UPDATE statements but a few of them occur
    on DELETE statements. Given the fact that the record actually is
    in the second master site, how is it possible to get a
    "ORA-01403: no data found" error on a delete statement ???????
    I can't figure out what data cannot be found,
    Thanks for your help,
    Didier.

    What if i tell you the first transaction in error is an UPDATE
    statement on a record that actually is in the destination table
    in the second master site. So the data is there, it should be
    found ...
    I've tried an EXECUTE_ERROR on that very first transaction
    in error but it doesn't work. Here's the call (as repadmin) :
    begin
    DBMS_DEFER_SYS.EXECUTE_ERROR (
    DEFERRED_TRAN_ID => '6.42.271',
    DESTINATION => 'AMELIPI.SENAT.FR'
    end ;
    And here's the full message :
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_DEFER_SYS_PART1" line 430
    ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1632
    ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1678
    ORA-06512: at line 2
    I thought it could be because the primary key constraint on the
    destination table wasn't activated but it was. Could it
    be a problem with the corresponding index ?
    Thanks for your help,
    Didier.

  • ORA-01403 No DATA FOUND Error

    Hi all,
    I have a Select Statement and when there is no record returned by the select I have the following error :
    ORA-01403 NO DATA FOUND. Is there a parameter or something I can change to avoid this error to occure ?
    Any help will be appreciated.
    Kind regards.
    Sébastien.

    The following query returns no row and an Exception ORA-01403 NO DATA FOUND occurs when I execute the statement.
    OPEN curs_Dealers FOR
    Select DD.DealerID, DEDP.FullName
    FROM D_Dealer DD, D_EditionDealerParticipation DEDP, T_LAnguage TL
    WHERE DEDP.FairEditionID = FairEditionID_ AND
    DEDP.DealerID = DD.DealerID AND
    DD.LanguageID = TL.LanguageID AND
    TL.LanguageTranslationID = LanguageID_
    ORDER BY FullName;
    The following query does not return any result either and there is no ORA 01403 NO DATA FOUND Exception thrown.
    It just returns an empty cursor.
    OPEN curs_Object FOR
    SELECT TOb.Title, DO.EntityID, DO.ObjectID
    FROM D_Object DO, T_Object TOb, D_Dealer DD
    WHERE DO.ObjectID = TOb.ObjectID AND
    TOb.LanguageID = Language_ID AND
    DO.DealerID = DD.DealerID AND
    DD.SiteID = Site_ID
    ORDER BY TOb.Title;
    Do you have any idea why those query does not returns the same thing?
    I'm using Oracle 10G
    Regards.

Maybe you are looking for

  • No option for hardware virtualization option in bios of DV6 1355dx / Windows 7

    No option for hardware virtualization option in bios of DV6  1355dx / Windows 7. Tried installing some SPs such as sp53216 , sp55068, etc but the extration will warn Cann't check platform ID & had to close the window.  Is there a sure shot patch to t

  • Dual Harddrives Mountain Lion

    Hi, how do I register my copy of mountain lion? I changed harddrives and I've been having permission problems with the harddrive that are stemming from the OS not being verified on my new harddrive. I purchased Mountain Lion from the App store on my

  • Bug LabVIEW PDA

    Has anybody experienced this 'bug' in LV PDA? If trying to update the value of a horizontal scrollbar using a local variable, the PDA application shuts down with no error message. Thanks

  • Basics of servlets

    Hi friends..... i have all basic knowledge of servlets but I am finding difficulty in running it on servelt... my problem is with XML file where we provide Servlet-mapping information and all other information about servlet.... can any one please pro

  • Can't reinstall compressor

    OS 10.6.5, MacPro 6 core 3.33GHz, 10GB RAM FCS2 (FCP 6.0.6, Compressor 3.0.5) Couldn't get Compressor to work with QuickCluster. Kept failing. Tried Compressor Repair. No luck. Decided to use FCP Remover and remove Compressor and QuarterMaster and th