No data found error on Pl/SQL

Hi All,
I write Pl/SQL that have package(procedure) to call some function like this :
Main Procedure
Call Function SubA
Function SubA
BEGIN
begin
select sale_by
into v_saleby
from myTable
where....
end;
return(nvl(v_saleby,0));
END;
so, I execute this package(procedure) and no record return and error message
show no data found ,I think it caused by Function SubA that select clause return
no record , How can I solve this problem???
Then I try to modify again to trap error with exception in the code shown below
;Function SubB
Function SubB
BEGIN
begin
select sale_by
into v_saleby
from myTable
where....
end;
return(nvl(v_saleby,0));
EXCEPTION
WHEN No_DATA_FOUND
THEN v_saleby := 0;
return(nvl(v_saleby,0));
END;
What position of exception should I place to?
Thank you..
Mcka

just wondering why you said your method is not working. it also works...
SQL> SELECT * FROM emp;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
      7858 Tonny
15 rows selected.
  1  CREATE FUNCTION fn_emp(pEmpNo NUMBER)
  2  RETURN NUMBER IS
  3   v_sal NUMBER;
  4  BEGIN
  5   SELECT sal INTO v_sal FROM emp WHERE empno = pEmpNo;
  6   RETURN v_sal;
  7  EXCEPTION
  8   WHEN NO_DATA_FOUND THEN
  9    RETURN 0;
10* END;
SQL> /
Function created.
  1  DECLARE
  2   l_retval NUMBER;
  3  BEGIN
  4   l_retval := fn_emp(7782);
  5   DBMS_OUTPUT.PUT_LINE(l_retval);
  6* END;
SQL> /
2450
PL/SQL procedure successfully completed.
  1  DECLARE
  2   l_retval NUMBER;
  3  BEGIN
  4   l_retval := fn_emp(1000);
  5   DBMS_OUTPUT.PUT_LINE(l_retval);
  6* END;
SQL> /
0
PL/SQL procedure successfully completed.

Similar Messages

  • No Data Found Error in wwv_flow_files

    Hello All,
    I have written a procedure to upload the .csv file data into one of my database Table. It was working fine some days back, but when I try to upload a .csv today, it gives me error "No Data Found".
    This is the Query I am using to fetch the data from wwv_flow_files table:
    select blob_content into v_blob_data
    from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = UPPER(:APP_USER))
    and id = (select max(id) from wwv_flow_files where updated_by = UPPER(:APP_USER));
    this is returning No data found error.
    Please suggest what is the problem.
    Apex vesion : 4.0.1.00.03
    DB: 11g
    Thanks
    Tauceef

    Hi Trent,
    As I said, I am using this code from a long time ago, it was working fine before and I have uploaded many files using this code.
    But suddenly I don't know what happen it start giving this error.
    For making sure that this statement is the one which is giving "no data found" error I commented all the other select statements
    and I still got no data found. So it's confirmed.
    One more thing, I tried to run this code in SQL command by hard coding the :APP_USER value and this is what I got in the result:
    BLOB_CONTENT
    [unsupported data type]
    means this code is returning something but at run time it is giving no data found.
    Please suggest.
    Thanks
    Tauceef

  • No data found error on Form on a Table with report

    Hi Everyone, I'm using Application Express 4.1.0.00.32 on Windows 7. I built a Form on a table with report. Earlier I was using rowid as a passing parameter but then I had to change it to primary key column from report to form.
    So in the "Fetch row process" I changed the "Items containing primary key value" and "Primary Key column" to P1004_PERSON_ID and PERSON_ID respectively. Which is my primary key.
    My Form is working exactly fine but at on point it throws "no data found error".
    I have a required date field in the form. So if the user doesn't fill in the date field and try to save the form, it throws the "Feild required error" and then when user enters date and try to save then it throws the error "No data found.". here is the snapshot... snapshot
    How can I fix this error.I'm really stuck.
    I checked debubber..it is as follows... in debughger it's still showing rowid. I don't know why. How can I fix that.
    Execution
    Message
    Level
    Graph
    0.00233
    0.00932
    S H O W: application="101" page="1004" workspace="" request="" session="123235901404364"
    4
    0.01161
    0.00102
    Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
    4
    0.01261
    0.00046
    alter session set nls_language="AMERICAN"
    4
    0.01307
    0.00042
    alter session set nls_territory="AMERICA"
    4
    0.01348
    0.00053
    NLS: CSV charset=WE8MSWIN1252
    4
    0.01401
    0.00042
    ...NLS: Set Decimal separator="."
    4
    0.01443
    0.00053
    ...NLS: Set NLS Group separator=","
    4
    0.01495
    0.00050
    ...NLS: Set g_nls_date_format="DD-MON-RR"
    4
    0.01545
    0.00051
    ...NLS: Set g_nls_timestamp_format="DD-MON-RR HH.MI.SSXFF AM"
    4
    0.01597
    0.00050
    ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR"
    4
    0.01647
    0.00079
    ...Setting session time_zone to -05:00
    4
    0.01726
    0.00046
    Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY
    4
    0.01772
    0.00060
    Setting NLS_TIMESTAMP_FORMAT to application timestamp format: DD-MON-YYYY HH24.MI.SSXFF
    4
    0.01832
    0.00092
    ...NLS: Set g_nls_date_format="DD-MON-YYYY"
    4
    0.01924
    0.00049
    ...NLS: Set g_nls_timestamp_format="DD-MON-YYYY HH24.MI.SSXFF"
    4
    0.01973
    0.00083
    ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR"
    4
    0.02056
    0.00099
    NLS: Language=en-us
    4
    0.02154
    0.00157
    Application 101, Authentication: PLUGIN, Page Template: 5091946581246503
    4
    0.02312
    0.00065
    ...fetch session state from database
    4
    0.02377
    0.00106
    fetch items
    4
    0.02483
    0.00065
    ...fetched 103 session state items
    4
    0.02548
    0.00194
    Authentication check: NTLM (NATIVE_CUSTOM)
    4
    0.02742
    0.00188
    ...Execute Statement: begin declare begin wwv_flow.g_boolean := f_ntlm_page_sentry_parm; end; end;
    4
    0.02930
    0.00050
    ... sentry+verification success
    4
    0.02980
    0.00042
    ...Session ID 123235901404364 can be used
    4
    0.03021
    0.00114
    ...Application session: 123235901404364, user=VARMAN01
    4
    0.03135
    0.00162
    ...Check for session expiration:
    4
    0.03297
    0.00075
    Session: Fetch session header information
    4
    0.03372
    0.00113
    ...Setting session time_zone to -5:00
    4
    0.03485
    0.00080
    Branch point: Before Header
    4
    0.03565
    0.00598
    Fetch application meta data
    4
    0.04165
    0.00081
    ...metadata, fetch computations
    4
    0.04245
    0.00076
    ...metadata, fetch buttons
    4
    0.04321
    0.00086
    Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY
    4
    0.04406
    0.00058
    Setting NLS_TIMESTAMP_FORMAT to application timestamp format: DD-MON-YYYY HH24.MI.SSXFF
    4
    0.04464
    0.00049

    Just an observance... SQL is still showing the rowid instead of the P1004_PERSON_ID ??
    where "PERSON_ID" = :p_rowid;
    should it not be :
    where "PERSON_ID" = :P1004_PERSON_ID:
    thx, Bill

  • ORA-01403 No Data Found error on Update

    I am having difficulty troubleshooting a form (6i) where the data can not be updated. This form was recently modified by another developer (who is no longer w/ us) and we removed a unique key from the items list in the data block, however the particular field is still contained in the table. There are no constraints on any fields in this table.
    I have a button pallette in the form and when I try to update and save, I get the "No Data Found" error message. However, I know there is data in the record but I can not figure out why the error.
    When I display the error, the sql code looks something like this:
    UPDATE db.temp
    SET P_ID=:1,S_ID=:2
    WHERE ROWID=:3
    I put a message in the do_key('list_values') trigger to show me the rowid but nothing comes up. I wonder if this has something to do with that and if so, why and how do I fix it?
    Appreciate any direction any of you can provide in coming to a solution on this. Thank you.

    I don't explicitly say ROWID=:3, what I mean, I
    didn't code the update query. My understanding is
    that it is done behind the scenes given the items in
    the data block. Ok, I couldn't tell from the post whether it was explicit or not. This is from
    Oracle FAQ:
    "I get 'NO DATA FOUND' errors. How does one handle this?
    An ORA-1403 (No Data Found) error is signalled within a replicated environment when there is a conflict in data. Here is an illustration of what happens in most scenarios featuring this error:
    Let's say we need to update a table and set column x=1 where x=9. When the first change occurs on the source database, Oracle checks to ensure that x=9. Once this transaction commits, it is queued for execution on the destination site(s). When the transaction is applied to the destinations, Oracle first check to verify that x=9 (the old value); if it does, then Oracle applies the update (update table set x = 1 where x = 9); if it does not, an entry to the DEFERROR table is logged indicating ORA-1403.
    If the application is updating primary key values, one can also expect plenty "NO DATA FOUND" errors. Primary keys should NEVER be updated. If one updates primary key values, conflict resolution also becomes extremely difficult. "
    Check your pll file and anywhere else you are using db.temp. Then check the the update using PLSQL.

  • ORA-01403 - No Data Found - Error processing validation

    Dear all
    I hope to find a solution for this error.
    ORA-01403 - No Data Found - Error processing validation
    Best Regards

    Dear Patrick,
    Thank you for your response.
    I solved or worked around the problem by adding exception handling lines to the end of all PL/SQL validation functions used in this page
    For example, if a function used in equation, it is not allowed to return null so I made it return 0 in case of exceptions (as in below code)
    -- NO_DATA_FOUND is ORA-01403
    EXCEPTION
    WHEN NO_DATA_FOUND THEN return(0);
    Sincerely Yours
    Mahmoud Rabie

  • Getting no data found error while CSV download

    Hi,
    I have a report generated from the PL/SQL returning the query and I enabled the CSV Download option. But, when I try downloading the report contents using CSV download option, the excel sheet contains message "no data found". I enabled sorting and sum on few columns. Is it anywhere related to CSV download? Any solution would be really helpful..
    Thanks,
    Prabhakar

    Thanks for the help!! yep, it is indeed the wrong session state value. In the report, I was modifying the value to display the report, hence when CSV download is given, it was taking wrong session state value. So, giving "no data found" error. Probably, this may help some people.
    Regards,
    Prabhakar

  • Should not raise no data found error

    Hi Experts,
    I am using select into statement in procedure and put some condition in select statement.
    I want if condition failed then it sould put null in to target variable . It should not raise no data found error
    e.g
    select abc into v_abc from table
    where cond1=cond;
    if this select statement no give any record it should put null into v_abc and not raise no data found error
    pls suggest something
    UG

    You could do...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_abc varchar2(20);
      3  begin
      4    SELECT
      5      CASE
      6        WHEN (select COUNT(*) from emp where empno = 1234) > 0 THEN
      7          (select ename from emp where empno = 1234)
      8        ELSE
      9          null
    10      END
    11    INTO v_abc
    12    FROM dual;
    13* end;
    SQL> /
    PL/SQL procedure successfully completed.But that's no better than doing a check first as a seperate SQL in the PL/SQL.
    I would do this... (if I really didn't want the no_data_found exception)
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_abc varchar2(20);
      3  begin
      4    SELECT max(ename)
      5    INTO v_abc
      6    FROM
      7      (
      8      SELECT ename from emp where empno = 1234
      9      UNION
    10      SELECT null from dual
    11      );
    12    dbms_output.put_line(NVL(v_abc,'!null!'));
    13* end;
    SQL> /
    !null!
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_abc varchar2(20);
      3  begin
      4    SELECT max(ename)
      5    INTO v_abc
      6    FROM
      7      (
      8      SELECT ename from emp where empno = 7782
      9      UNION
    10      SELECT null from dual
    11      );
    12    dbms_output.put_line(NVL(v_abc,'{null}'));
    13* end;
    SQL> /
    CLARK
    PL/SQL procedure successfully completed.
    SQL>

  • Weird no data found error in Pro*C

    Hi,
    I am getting a no data found error when I am making a query on all_constraints and all_cons_columns in my pro*C program. It is sure that the row exists.
    I am writing here the block of pro*C code. The count returned by printf statement gives 7, which means 7 records are there. But the second query raise no data found exception. Please note that both the queries have same where clause. Pls suggest.
    EXEC SQL SELECT count(*) INTO :count:h_count
    FROM ALL_CONSTRAINTS AC,
    ALL_CONS_COLUMNS ACC
    WHERE AC.TABLE_NAME = ACC.TABLE_NAME
    AND AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME
    AND AC.TABLE_NAME = 'CDA_BOOK_STATUS';
    printf(" The count of constraints is %d\n",count);
    /* this raises no data found ??? **/
    EXEC SQL SELECT SUBSTR(AC.TABLE_NAME,1,30) table_name,
    SUBSTR(ACC.COLUMN_NAME,1,30) column_name,
    SUBSTR(ACC.CONSTRAINT_NAME,1,30) constraint_name,
    AC.CONSTRAINT_TYPE INTO :constraint_arr INDICATOR :h_constraint_arr
    FROM ALL_CONSTRAINTS AC,
    ALL_CONS_COLUMNS ACC
    WHERE AC.TABLE_NAME = ACC.TABLE_NAME
    AND AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME
    AND AC.TABLE_NAME = 'CDA_BOOK_STATUS';

    Are you getting the 'NO DATA FOUND 'error when you use 4 sets of normal and indicator variables?
    For example,
    EXEC SQL SELECT SUBSTR(AC.TABLE_NAME,1,30) table_name,
    SUBSTR(ACC.COLUMN_NAME,1,30) column_name,
    SUBSTR(ACC.CONSTRAINT_NAME,1,30) constraint_name,
    AC.CONSTRAINT_TYPE INTO :col1_arr INDICATOR :col1_ind,
    :col2_arr INDICATOR :col2_ind,:col3_arr INDICATOR :col3_ind,:co14_arr INDICATOR :col4_ind
    FROM ALL_CONSTRAINTS AC,
    ALL_CONS_COLUMNS ACC
    WHERE AC.TABLE_NAME = ACC.TABLE_NAME
    AND AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME
    AND AC.TABLE_NAME = 'CDA_BOOK_STATUS';Indicator variables may not be necessary (there may not be any null values in your select statement).

  • Do Data Found Error on Inserting a Record

    I am working in Apex 4.0.
    I'm getting this error when I click the "Create" button to insert a record.
    ORA-01403: no data found
         Error      Unable to fetch row.
    Since I'm inserting rather than fetching, why would I get this error? What do I need to do to suppress it?

    Arie, thanks for the response. I suspected the automatic Row Processing might be the problem. But I did not (and still don't) know how to fix it.
    Here's what's happening. The page involved is part of an insurance tracking system. At the time of annual renewal of a policy, we create a new record for the next year. This is done by including in the new record all usuable data fields from the old expiring record. I use a button to navigate to the current page (page 22 to page 22) and set values (from the old page 22) of items in the new page 22. The user then makes a couple of manual entries and then clicks the "Create" button which appears on the new page 22 since the primary key is null. The new record is then correctly inserted into the table, and the system branches back to a calling page. It is at this time that the error occurs.
    ORA-01403: no data found
    Error Unable to fetch row.
    A database trigger gets the new primary key from a sequence generator and puts it into the record on insert. Here's the SQL on the trigger:
    CREATE OR REPLACE TRIGGER "UCC_AUTO_SEQ"
    BEFORE
    insert on "UCC"
    for each row
    begin
    select ucc_seq.nextval
    into :new.uccseq
    from dual;
    end;
    May be that I can fix this if you will explain to me what you mean by this: "My guess is that your page includes an ARF process and you didn’t set the return key item, or you didn’t use the RETURNING clause, so the ARF process can’t fetch the newly inserted record." Forgive my ignorance, but I do not know what a "RETURNING clause" is. I checked out the Source: Automatic Row Processing (DML) and found that the item labeled "Return Key Into Item" was blank. I put "P22_INSURESEQ" (the primary key item) into this field, but the error is still being thrown. The "Action Processed" message always appears in its own window just above the error message.

  • 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

  • No Data Found Error in Transaction Source Types Form

    Hi All,
    We are using 11.5.10.2 version of Oracle Apps.
    When i navigate to INV responsibility, Setup -> Transactions -> Source Types, upon the opening of the Transaction Source Types form, i get a series of "No Data Found" error pop up messages. I searched in metalink too but couldn't find any resolution for the same.
    Does anyone know as to how to resolve this issue? Is there any patch that needs to applied? Kindly help.
    Regards,
    Hemanth

    Hi Julie,
    On the "Process Row of..." process, make sure that it is unconditional and that the Delete opertion checkbox is ticked. Deletions from the main table should only be triggered by a DELETE request which should be issued by the "Delete" button.
    On the "Apply MRD" process, make sure that the condition is "Request is Contained within Expression 1" and Expression 1 is: APPLY_CHANGES_MRD,SAVE
    This process should be triggered by the "Delete Checked" button, which should have a URL target of:
    javascript:confirmDelete(htmldb_delete_message,'APPLY_CHANGES_MRD');This triggers the confirmation popup and submits the page with APPLY_CHANGES_MRD as the REQUEST value which should be picked up by the "Apply MRD" process only.
    Andy

  • Getting 'No Data found' Error when clicking the edit link to edit a record.

    Application Express 4.2.0
    Database: oracle 11g
    Hi Guys
    I am getting an error whenever i try to edit some of my entries by clicking the edit link, i have a composite Primary key attributes of three columns ( Budget Year ('YYYY'), Training Name('VARCHAR') and Emp Code ('VARCHAR')
    Some records will load when i click Edit but some wont and return 'ORA-01403: no data found' error.
    Any help will be appriciated.
    Thanx
    MATT

    Hi,
    Please create example about problem to apex.oracle.com and share developer login details to workspace.
    Regards,
    Jari

  • No data found Error

    Hi all ,
    Following code throwing no data found error.
    It is working properly for IF x <> 0 condition but when count(*) is 0 then it's thrrowing error.
    earlier same code working properly as our client is using this application.
    code on when_button_pressed trigger:
    DECLARE
    user1 VARCHAR2(20);
    x NUMBER(4);
    BEGIN
    FOR c1 IN( SELECT COUNT(*) x
    FROM vinay.file_proc
    WHERE sector = :sector
    and block = :block1
    and plot_no= :plotno
    and plot_size = :plotsize)
    LOOP
    x := c1.x;
    END LOOP;
    IF x <> 0 THEN
    MESSAGE('Record Exists');
    MESSAGE(' ');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    MESSAGE(' after if');
    MESSAGE(' after if');
    win_api_utility.copy_file(ltrim(rtrim(:ADRIVE1)),ltrim(rtrim(:DESTINATION)),TRUE,TRUE);
    MESSAGE(' copy file');
    MESSAGE(' ');
    SELECT user INTO user1 FROM DUAL;
    INSERT INTO vinay.file_proc values(:sector,:block1,:plotno,:plotsize,user1,sysdate);
    COMMIT;
    MESSAGE(' ');
    CLEAR_BLOCK(NO_VALIDATE);
    END;
    :block2.path1:=:global.drive1;
    GO_ITEM('BLOCK2.ADRIVE');

    Hi,
    I think there is a problem with WIN_API_UTILITY.copy_file can anybody tell me if there is any restriction with this package.

  • AFTER INSERT TIGGER, ora-01403: no data found error

    Hi all,
    I'm trying to create a fairly simple trigger which fires after an insert on a table.
    The trigger is based on a function, defined within a package. The function is as follows...
    FUNCTION check_contract_length (V_playerId IN NUMBER)
    RETURN BOOLEAN
    IS
    months NUMBER;
    months2 NUMBER;
    BEGIN
    SELECT months_between(contract_end, contract_start), contract_length
    INTO months, months2
    FROM player
    WHERE playerId = v_playerId;
    IF months <> months2 THEN
    RETURN (true);
    END IF;
    RETURN (false);
    END check_contract_length;The trigger operates when an insert is made on to the player table, it as defined as follows...
    CREATE OR REPLACE TRIGGER play_ins_con
    AFTER INSERT ON player
    FOR EACH ROW
    DECLARE
    isover BOOLEAN;
    BEGIN
    IF INSERTING THEN
    isover := player_constr_pkg.check_contract_length(:new.playerId);
    IF isover THEN
    RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
    END IF;
    END IF;
    END play_ins_con;My problem is, is that every time I try to insert a row into the player table, the trigger fires and produces a "ora-01403: no data found" error. I was under the impression that as the trigger fires after an insert, this shouldn't be a problem.
    I'm also aware that this constraint can probably be implemented using a CHECK constraint, however it would be a learning curve for me to work it out this way.
    Any help would be much appreciated!!
    Cheers guys.

    I'm also aware that this constraint can probably be implemented using a CHECK constraint,
    however it would be a learning curve for me to work it out this way.Starting out by doing stuff the wrong way only increases the learning curve when it comes to doing things the right way. A check constraint is definitely the best way of doing it. However, if you must do it with a trigger this is the way to go:
    CREATE OR REPLACE TRIGGER play_ins_con BEFORE INSERT ON player
    FOR EACH ROW
    BEGIN
        IF months_between(:NEW.contract_end, :NEW.contract_start) <> :NEW.contract_length
        THEN
            RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
        END IF;
    END play_ins_con;
    /Incidentally, as CONTRACT_LENGTH is wholly derivable from the other columns your table structure is obviously insufficiently normalised.
    Also, note that only errors between -20999 and -20000 are reserved for our use. Any other number may be used by Oracle for its own purposes.
    Cheers, APC

  • APEX bug:9879227 (ORA-01403: no data found error when using validations)

    Hi,
    We are getting the
    ORA-01403: no data found error
    when the APEX page has validations AND a tabular form is also present on the page.
    I did see a couple of other forum links discussing the issue (bug id: 9879227 ?? ).
    But what i want to get a confirmation on is, in which release was this bug really fixed ?
    i see the release notes of 4.0.1.00.03 claiming that it is fixed
    in the release.
    we are on 4.0.1.00.03. is this bug really solved in release 4.0.1.00.03?
    are there any known work-arounds ? i tried re-creating the report multiple times, but that did not help.
    Any suggestions or work-arounds will greatly help us.
    Regards,
    Ramakrishnan

    Ramakrishnan,
    If you are talking about getting no data found when trying to save the report then take a look at the last message in this thread:
    {message:id=9971445}
    Cheers,
    Tyson Jouglet

Maybe you are looking for

  • Add missing column in S_ALR_87011963 but there is no data on it

    Hi all, I added the 'Internal order' field in a sort version used in report S_ALR_87011963 via transaction OAVI. The column is now being displayed with 'Cost order' as header and there is no data on it. Can anyone please advise how to solve this prob

  • At line-selection /at user-command in alv

    hai ,          i used layout-listappend to output 3 alv's in one page .but after using layout-listappend i_usercommand in reuse_alv_.. is not working .so i tried to use at line selection . please guide me to solve this problem how to use at line-sele

  • Handling revaluating cost for ECP version 0 in CJ9ECP/CJ20N

    From sale transaction i need to call cj20n/cj9ecp for revaluating cost estimates. Can anyone say how to proceed with this thing. Can any one say how to handle pop up window in CJ20N/CJ9ECP when clicked edit ecp button. Later how to revaluate cost est

  • Audio problem going from Premiere 6.0 to Premiere Pro

    When I go from Premiere 6.0 to Premiere Pro the audio is messed up. I figured how to make the audio okay at one point ... something to do with 48k, importing or exporting. But I forget what I did. Does anyone know that specific routine?

  • My iPhone volume buttons won't work, but some volume, no music

    My iPhone will not play any sounds, except for phones calls and my ringer. The volume will not work; when I press them the volume icon pops up on the screen, the volume won't change and the volume bar doesn't move on the screen. Also the volume contr