ORA-01403: no data found in basic select into command
Hi All,
I have an interesting issue which is driving me crazy.
I have a rather large procedure which I am utilizing in my apex environment which is returning the error: ORA-01403: no data found
So i thought I would cut down the procedure and I have been able to isolate the below procedure:
DECLARE
entry_type varchar2(200);
orig_ci_name varchar2(64);
orig_window_start date;
orig_window_end date;
orig_audit_change_no varchar2(15);
orig_mv_id number;
BEGIN
select ci_name, window_start, window_end,
audit_change_no, mv_id into orig_ci_name, orig_window_start, orig_window_end,
orig_audit_change_no, orig_mv_id
from tivoli_impact_coles.maintenance_window
where MV_ID = 1937;
dbms_output.put_line(orig_ci_name || orig_window_start || orig_window_end || orig_audit_change_no || orig_mv_id);
END;When I run this (cut down procedure) in the process part of my apex page I get the error. When I run it from a sql prompt it works fine. Any ideas?
By the way the row exsists and the below is returned when i print the variables from the sql prompt:
test_new_daily, 20100217 23:23:00, 20100218 03:30:00, 3434, 1937
Thanks in advance,
Brett
DECLARE
entry_type varchar2(200);
orig_ci_name varchar2(64);
orig_window_start date;
orig_window_end date;
orig_audit_change_no varchar2(15);
orig_mv_id number;
BEGIN
select ci_name , window_start , window_end , audit_change_no , mv_id
into orig_ci_name, orig_window_start, orig_window_end,orig_audit_change_no, orig_mv_id
from tivoli_impact_coles.maintenance_window
where MV_ID = 1937;
-- dbms_output.put_line(orig_ci_name || orig_window_start || orig_window_end || orig_audit_change_no || orig_mv_id);
HTP.P(orig_ci_name || orig_window_start || orig_window_end || orig_audit_change_no || orig_mv_id);
EXCEPTION
WHEN NO_DATA_FOUND THEN
HTP.P('NO DATA FOUND');
WHEN OTHERS THEN
HTP.P(SQLERRM);
END;
Similar Messages
-
ORA-01403 NO DATA FOUND ERROR AFTER SELECTING PORTAL LINK TO CALL FORM
I have a portal application link that I use to call a form. The field on this
form gets populated based on a bind variable that is passed in by the link.
This was working 2 weeks ago but now when I click on the link to call the form
I am receiving the following error "AN UNEXPECTED ERROR OCCURRED ORA-01403 - NO
DATA FOUND". This happens in more than one application where I set this type
of link to call a form. Anyone have any ideas?!!Hi Andy,
Thank you very much for your time!
The fields in the form are all right. The fields get filled in perfectly in most of the cases, only those few rows don't :(
However, now that you wrote of the process of row fetching, I think that maybe I have an idea of what is happening. My table has two primary keys (two fields together make the primary key, I don't know how it's called in English), one of them is a date. (I know that this is quite a bad practice, but, much to my regret, I cannot change it.) Now, this date is in YY-MON-DD format, which is used by my language.
One of this dates is from 1800's. As my report shows it, the year gets truncated to the last two character. APEX passes this value into the field of the form using varchar2, and when it tries to cast it back to YY-MON-DD format, then it supposes it's from 1900's instead of 1800's. With 19xx however it doesn't find my field.
Does this sound logical? It seems logical to me, but I am a beginner... :(
Still, if this is the core of the problem, it's most possibly not the only problem, because I have dates from 19xx which can't identify their rows... But I am suspicious because of these date things. If you have any idea then please let me know.
Thanks,
Eszter -
ORA-01403: no data found error hile inserting into a table
Hi,
I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
Please someone help me. Below is the code.
CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
IS
BEGIN
IF t_array.count> 0 THEN
FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
FOR i IN t_array.FIRST..t_array.LAST
LOOP
INSERT INTO XXDL_TEST
VALUES(t_array(i).name )
END LOOP;
END IF;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
END;Thanks
AlakaIt looks like your Array is sparsely populated:
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(2) := 'B';
8 l_tab(3) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
B
C
PL/SQL procedure successfully completed.
SQL>
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(3) := 'B';
8 l_tab(4) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
DECLARE
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
You should also be using the FORALL syntax with INDICES OF. Check out The Docs -
Help with ORA-01403: no data found please.
First off I'd like to apologise for my lack of PL/SQL experience, what follows may seem naive, but I guess we all have to start somewhere.
I'm trying to create a function which determines an employee's Annual Holiday Entitlement by comparing their length of service against a lookup of entitlement values. Due to the complexity of the application I'm targeting there are a number of other factors to be take into consideration, but this is the basic idea of what I want to achieve.
I've started by taking a working SQL Server 2005 function and converted this using the translation scratch pad in SQL Developer 1.5.1 I'm now hand cranking the subtleties into the script but when I debug the code I'm getting "ORA-01403: no data found" at almost every SELECT. In fact the only successful select is from the ABS_SYSTEM_CONTROLS table. I can handle the first few failures by setting default values in the variables that I'm trying to load, but this isn't an option when it comes to selecting the DATE_OF_START from the PERSON table.
I've sure I've probably made some fundamental error, but can't spot it myself. Any help would be most welcome.
I've included the entire script below for your entertainment ;-)
Thanks
Phil.
create or replace
function mygetannualholidayentitlement
( v_empNo in varchar2
, v_inputDate in DATE
) return number as
-- Declare variables here
v_entitlement FLOAT(53);
v_holidayPlan VARCHAR2(20);
v_contServiceOption VARCHAR2(255);
v_postNo CHAR(16);
v_lengthOfService NUMBER(10,2) ; -- Need to give this a default value else the CURSOR (below) won't initialise.
v_empStartDate DATE;
-- Load up our loacal variable for each row in the loop and the final value is the one we want.
v_selectedLOF FLOAT(53);
v_selectedDateEffective DATE;
v_selectedAmount FLOAT(53);
v_effectiveDate DATE;
-- Cursor declaration
-- Holiday plan details are also keyed on DATE_EFFECTIVE. Need to identify which row is active as at our @effectiveDate.
CURSOR holDefCursor
IS SELECT length_of_service,
date_effective,
amount
FROM holiday_plan_def
WHERE hplan_code = v_holidayPlan
AND length_of_service < v_lengthOfService
ORDER BY date_effective ASC,
length_of_service ASC;
BEGIN
-- Initialise variables --
-- truncate any hours/Mins & secs from effective date
v_effectiveDate := trunc(v_inputdate);
v_entitlement := 0;
v_contServiceOption := 0;
v_lengthOfService := 0;
BEGIN
SELECT HPLAN_CODE
INTO v_holidayPlan
FROM APPT_HOLIDAY_BALANCE
WHERE emp_no = v_empNo
-- post_no = @postNo and
AND ( v_effectiveDate BETWEEN HOLIDAY_YEAR_START AND HOLIDAY_YEAR_END );
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_holidayplan:=NULL;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
-- Still no hoildayPlan? Then use the default plan code from ABS_SYSTEM_CONTROLS.
IF v_holidayPlan IS NULL THEN
SELECT HPLAN_CODE
INTO v_holidayPlan
FROM ABS_SYSTEM_CONTROLS ;
END IF;
BEGIN
SELECT OPTION_VALUE
INTO v_contServiceOption
FROM PS_OPTIONS
WHERE OPTION_NAME = 'CONTINUOUS_SERVICE_OPTION';
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_contServiceOption := 'N' ;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
IF v_contServiceOption = 'Y' THEN
BEGIN
-- Need to take into account the employees CONTINUOUS_SERVICE_DATE when calculating length of service
BEGIN
SELECT CONTINUOUS_SERVICE_DATE
INTO v_empStartDate
FROM person
WHERE emp_no = v_empNo;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_empStartDate := NULL;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
-- If we can't get a CONTINUOUS_SERVICE_DATE we will fall back to PERSON.DATE_OF_START
IF v_empStartDate IS NULL THEN
BEGIN
SELECT DATE_OF_START
INTO v_empStartDate
FROM PERSON
WHERE emp_no = v_empNo;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
END IF;
END;
ELSE
BEGIN
-- Need to use employees DATE_OF_START when calculating length of service
SELECT DATE_OF_START
INTO v_empStartDate
FROM PERSON
WHERE emp_no = v_empNo;
END;
END IF;
-- Now we can get length of service
v_lengthOfService := sqlserver_utilities.datediff('MONTH', v_empStartDate, v_effectiveDate) / 12.00;
OPEN holDefCursor;
FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
WHILE ( sqlserver_utilities.fetch_status(holDefCursor%FOUND) = 0 )
LOOP
BEGIN
IF v_selectedDateEffective < v_effectiveDate THEN
v_entitlement := v_selectedAmount;
END IF;
-- Get the next value.
FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
END;
END LOOP;
CLOSE holDefCursor;
-- Return the result of the function
RETURN v_entitlement;
END;Edited by: user4395499 on 27-Oct-2008 04:04
Edited by: user4395499 on 27-Oct-2008 04:05
Edited by: user4395499 on 27-Oct-2008 07:10Your code is extremely procedural - whilst you could ultimately get it to work like this, it is not the most efficient way of doing it.
You should think about reducing your code to one sql statement if at all possible - this reduces the amount of context switching that needs to take place (eg. Going from PL/SQL to SQL back to PL/SQL to SQL, etc) and is usually much easier to maintain and test. You could do this by joining the various tables together, (and you might want to think about using nvl() to combine the two queries on the PERSON table!).
Also, you've labelled your parameters "v_" and your variables "v_" ... common convention uses "p_" for parameters, to allow for easy distinction between parameters passed in and variables declared during the course of the procedure/function.
As to the char() defined column - is there any chance that you could change that? As you've found out, chars are usually not a good datatype to use! Storing numbers in a char/varchar2 column is a no-no too, as you then run the risk of having invalid numbers stored in the column. -
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 -
Forms application returns "ORA-01403 no data found" exception on Windows 7
Hi everyone,
I am currently involved in an application compatibility project for an O/S migration from Windows XP to Windows 7.
We have a legacy Oracle Dev6i P18 Forms application that has been working perfectly on Windows XP for the last decade or so. When we installed the same application on Windows 7, it returned a pop-up error message with the text: "ORA-01403 no data found" when performing a certain operation (clicking on a Submit button in a specific form). The same operation works successfully on Windows XP displaying the message "Submit has been successful".
This error is well documented and the solution involves adding an exception handler to the faulting SQL statement(s) in order to handle the ORA-01403 exception. Unfortunately, the application is composed of compiled forms (.FMX) and we no longer have the source code so I can't implement this solution.
I ran a file comparison utility (WinDiff from the Windows SDK) and confirmed that all the files in the application folder and the Oracle Dev6i P18 folder are identical on both the Windows XP and Windows 7 systems.
I enabled tracing in SQLNet.ORA by configuring TRACE_LEVEL_CLIENT=SUPPORT (I know, too verbose) and other related settings on both systems and have uploaded the traces to my SkyDrive for public viewing:
http://sdrv.ms/10BNYtI
The traces show that the "ORA-01403" exception occurs many times on both Windows XP and Windows 7 systems as a result of various SQL statements being executed, for instance:
SELECT TASK_ID,TASK_DETAIL_STATUS,ASSIGNED_DATE FROM TASK_DETAILS WHERE TASK_ID = :b1 AND TASK_DETAIL_STATUS = (SELECT ID FROM V_TASK_STATUS WHERE ABBREVIATION = 'PLANNED' ) FOR UPDATE OF TASK_DETAIL_STATUS,ASSIGNED_DATE
UPDATE TASK_DETAILS SET ASSIGNED_DATE=NTMS_UTIL.GET_SERVER_DATE,TASK_DETAIL_STATUS=(SELECT ID FROM V_TASK_STATUS WHERE ABBREVIATION = 'ASSIGNED' ) WHERE ROWID = :b1
ORA-01403: no data found.
So the same error happens on both Windows XP and Windows 7.
On Windows XP, the error is somehow handled, and does not cause the "Submit" operation to fail.
On Windows 7, however, the error bubbles to the surface and is displayed to the user, thus halting the "Submit" operation.Thank you. I'm well aware that adding an exception handler is the classic solution to the ORA-01403 error. However, like I mentioned in my original post, I don't have the source code. All I have are the compiled .FMX forms so I can't implement such a solution:
From my original post:
This error is well documented and the solution involves adding an exception handler to the faulting SQL statement(s) in order to handle the ORA-01403 exception. Unfortunately, the application is composed of compiled forms (.FMX) and we no longer have the source code so I can't implement this solution. -
REP-1401: Fatal PL/SQL error occurred. ORA-01403: no data found
Hi guys,
I am getting error 'REP-1401: Fatal PL/SQL error occurred. ORA-01403: no data found ' when run the report
and i m also use formula column in my report.
can any body help me why it's coming.
following code is used in formula column plz check and verify:
function CF_3Formula return Char is
T1 VARCHAR2(100);
begin
SELECT
VAT_REG_NO INTO T1
FROM
JA_IN_HR_ORGANIZATION_UNITS JIHOU,
HR_LOCATIONS HL--,
--MTL_TXN_REQUEST_HEADERS MTLH
WHERE
JIHOU.ORGANIZATION_ID=HL.INVENTORY_ORGANIZATION_ID AND
JIHOU.LOCATION_ID=HL.LOCATION_ID AND
--Jihou.ORGANIZATION_ID = Mtlh.Organization_Id AND
-- Hl.INVENTORY_ORGANIZATION_ID =Mtlh.Organization_Id AND
-- MTLH.ATTRIBUTE10=SUBSTR(HL.LOCATION_CODE,1,3) AND
SUBSTR(HL.LOCATION_CODE,1,3)= :TO_ORG1 ;
RETURN (T1);
end;
plz help me out.Hi;
What is EBS version? Is it custom report or not?
See below which is mention similar errors
Autoinvoice Error: ORA-1403: no data found [ID 1209403.1]
APXIIMPT - Payable Open Interface Import Fails on "REP-1401: 'cf_source_nameformula': Fatal PL/SQL error occurred. ORA-01403: no data found" [ID 222058.1]
Regard
Helios -
PLSQL function body returning an sql report returns ORA-01403 No Data Found
I am on APEX 3.1.2.00.02 and Oracle 10g.
I am developing a report with SQL Query (PL/SQL function body returning SQL query) type. But on running the report I am getting
report error:
ORA-01403: no data found
Region Source
declare
qry varchar2(32767);
begin
--Procedure call
my_pkg.get_query(qry);
htp.p(qry);
return /*select 1 from dual */ qry;
end;
Procedure
PROCEDURE get_query (V_QRY OUT VARCHAR2)
IS
qry varchar2(32767);
begin
qry := ' select name
, max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Jan-09"
, max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Feb-09"
from MY_TABLE
group by name ';
V_QRY := qry;
end;
The query will be enhanced later to add more months and year based on user parameters once I am successfull in running report on this.
I wish to use Query Specific Column names. I have seen this suggestion from Scott in a number of threads to use /*select 1 from dual */ with query but not working in my case.
Can someone please suggest what can I do to make it working?
Regards,
AmirFirstly, have you unit tested the procedure (namely, within the SQL Workshop, SQL*Plus, SQL Developer,etc, etc.) to see if it produces the right output in the first place?
If you have, and the query string generated is valid, try assigning the output to a page item (thus allowing you to view it in the session browser) or even pass the procedure output into the debug window (with the use of the wwv_flow.debug function). This might reveal some state or session change which is causing it not to return.You might find this easier to achieve if you change from a 'procedure and out parameter' combination to a 'function returning string' approach.
Alternatively, try re-creating the report in a new region - occasionally I've come across weird bugs with report regions which resolved themselves in this manner. -
PL/SQL function body returning SQL - report error:ORA-01403: no data found
Hi,
I am working on Application Express 4.0.2.00.06, and 11G database.
I have a problem with classic report area of type - PL/SQL function body returning SQL query. Query works if I define region area as - Use Generic Column Names (parse query at runtime only), and does not when I define it - Use Query-Specific Column Names and Validate Query.
I am getting error:
report error:ORA-01403: no data found
This is my query that is returned from function, and displayed with htp.p, and it works ok and returns data in SQL Developer and SQL Workshop (in Apex).
<code>
/* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA
</code>
As you can see, I even tried with workaround that I found on the previous post on the forum, and that is to put /* select 1 from dual */ to start query.
Any help would be appriciated./* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA
-
NEED HELP IN CONFLICT HANDLER ERROR ORA-01403: no data found
Hi All,
I am using Oracle Streams to replicate the data...
I need to update the records on the destination with some particular condition like if USER_COUNTRY = 'XXX' then the data need to be updated in the destination side else skip ...
I wrote the procedure ..below .. the data is not replicating and found the below error from dba_apply_error..
ORA-01403: no data found
ORA-06512: at "SYS.LCR$_ROW_RECORD", line 419
Table called history_row_lcrs is created in the strmadmin to store the lcr values...
CREATE OR REPLACE PROCEDURE proc_test(in_any sys.anydata)IS
lcr sys.lcr$_row_record;
rc pls_integer;
v_type varchar2(20);
col_1 sys.anydata;
lcr_usercountry varchar2(20);
TRANS varchar2(20);
skip_routine Exception;
BEGIN
rc:=in_any.GetObject(lcr);
v_type:=lcr.get_command_type();
col_1:=lcr.get_value('NEW','USER_COUNTRY');
rc:=col_1.GetVarchar2(lcr_usercountry);
for x in ( select user_country from TEST.TESTREP1
where USER_COUNTRY=lcr_usercountry)
Loop
IF (x.USER_COUNTRY = 'XXX')
THEN
insert into strmadmin.history_row_lcrs VALUES (SYSDATE, lcr.GET_SOURCE_DATABASE_NAME(), lcr.GET_COMMAND_TYPE(),
lcr.GET_OBJECT_OWNER(), lcr.GET_OBJECT_NAME(), lcr.GET_TAG(), lcr.GET_TRANSACTION_ID(), lcr.GET_SCN(),
lcr.GET_COMMIT_SCN,lcr.GET_VALUES('old'), lcr.GET_VALUES('new', 'n'));
lcr.EXECUTE(true);
ELSE
Raise Skip_routine;
END IF;
END Loop;
Exception
when skip_routine Then
null;
END;
BEGIN
DBMS_APPLY_ADM.SET_DML_HANDLER(
object_name => 'TEST.TESTREP1',
object_type => 'TABLE',
operation_name => 'UPDATE',
error_handler => false,
user_procedure => 'STRMADMIN.PROC_TEST',
apply_database_link => NULL,
apply_name => NULL);
END;
Please try to help me if am doing something wrong...because I need to update only one colums am using DML_HANDLER instead of SET_UPDATE_CONFLICT_HANDLER...
Any other inputs are also appreciated...
Thanks In Advance and appreciate for the quick reply...I fired the query, am not getting any output from dbms_output.put_line('..|USER_COUNTRY..');
Is that no data is reading or may be any reason else..
in this table store_id is the primary key ..
SQL> set serveroutput on
SQL> CREATE OR REPLACE PROCEDURE test(in_any sys.anydata) IS
2 lcr sys.lcr$_row_record;
3 rc pls_integer;
4 v_type varchar2(20);
5 col_1 sys.anydata;
6 col_2 sys.anydata;
7 lcr_usercountry varchar2(20);
8 lcr_storeid number;
9 TRANS varchar2(20);
10 store_id number;
11 USER_COUNTRY varchar2(20);
12
13 BEGIN
14 rc:=in_any.GetObject(lcr);
15 v_type:=lcr.get_command_type();
16 col_1:=lcr.get_value('NEW','USER_COUNTRY');
17 rc:=col_1.GetVarchar2(lcr_usercountry);
18 col_2:=lcr.get_value('NEW','STORE_ID');
19 rc:=col_2.getnumber(lcr_storeid);
20 select user_country into user_country from dev03.testrep1 where user_country=lcr_usercountry and store_id=lcr_storeid;
21 dbms_output.put_line('---------||USER_COUNTRY ||-----------');
22 END;
23 /
Procedure created.
Thanks for your help .... -
ORA-01403: no data found BPEL Error on DB Adapter
Dear All,
I am using a DBAdapter to call a Stored Procedure in a Package. One of the parameter of the stored procedure is of table type. While invoking the BPEL Process, it shows the following error:
Fault Error.com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{code=<code>1403</code> ,summary=<summary>file:/u03/soauser/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_InventoryProduct_1.0_579640da6283d0dbd00cca17cf50e0f7.tmp/InvProductDBService.wsdl [ InvProductDBService_ptt::InvProductDBService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'InvProductDBService' failed due to: Error while converting to a Java struct object. Unable to convert the XSD element P_ITEM_TBL_ITEM whose user defined type is APPS.XXHDNL_INV_MTL_SYSITEMS_PKG_2. Cause: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 [Caused by: ORA-01403: no data found ORA-06512: at line 1 ] ; nested exception is: ORABPEL-11802 Error while converting to a Java struct object. Unable to convert the XSD element P_ITEM_TBL_ITEM whose user defined type is APPS.XXHDNL_INV_MTL_SYSITEMS_PKG_2. Cause: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 [Caused by: ORA-01403: no data found ORA-06512: at line 1 ] Check to ensure that the XML data describing the user defined type matches the definition of the struct in the XSD. Contact oracle support if error is not fixable. </summary> ,detail=<detail> Internal Exception: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 Error Code: 1403</detail> }} </ErrorDescription>
What could be the possible solution for this to get fixed. Please update..
Many thanks in advance....This is a PL/SQL error, it occurs when a cursor (SQL statement) is called and returned no values, typically you should have an exception handler in the PL/SQL to mange this. But sometimes you want the PL/SQL to fail.
The parameters you are using to invoke the PL/SQL procedure returned no values, therefore to fix provide information that does return values, or in the PL/SQL put an exception handler in to manage the no-data-found error, e.g.
begin
Select ...
Into ..
From ..
Where ..
Exception
when no_data_found then
end;cheers
James -
Strange problem: ORA-01403: no data found when report has a sort
Hi,
I have a report which behaves very strangely but only for one particular user. The report runs fine when no columns are set as sort-by in the report attributes. As soon as I try and set a column to sort (any column, it doesn't matter) this user gets the error message:
failed to parse SQL query:
ORA-01403: no data found
appear where the report should be on the page. The rest of the page displays OK. No other users are affected. If I remove the sort then the report is OK for this user (unsorted though!)
The report is a structured query with custom column headings, nothing unusual, quite basic. I have tried exporting and reimporting the page but it doesn't fix it. Same behaviour for this particular page in our test system as well.
I could rebuild the page but I'd rather know what is wrong in case it happens to some other region.
Thanks,
SteveSteve,
The reports engine stores the sort settings in the user preferences. This is done so that when you return to a report, it maintains the earlier sort settings. Like in your response to the HTML DB studio posting, you would keep your report sorted by "Created On" descending or ascending even when you come back another time. It's save to remove those preferences; all that's going to happen is that your users will see the report using the report's default settings the next time they go to that page. I will try to investigate this problem further, whatever additional information you can provide, will be helpful,
Marc -
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 -
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. -
Error saving column settings with ORA-01403: no data found Error
Hi
I have a region with multi row report updatable.
When I am trying to change the query I am getting below error.
Anybody let me know what will be the problem.
ORA-01403: no data found
Error saving column settings
Regards
KiranHi
I was using below query for this region.
SELECT
result.segment1 Item#,
result.inventory_item_id,
result.revision,
result.lot_number,
result.Lot_Onhand,
result.Heat,
result.Cert_Site_Number Cert_Site_Number_Display,
result.status_code Status_Code_Display,
result.Cert_ID Cert_ID_Display,
result.Cert_Site_Number,
result.status_code,
result.Cert_ID,
result.transaction_id,
result.po_header_id,
result.po_line_id,
result.rcv_transaction_id,
result.shipment_header_id,
result.shipment_line_id
FROM
SELECT
msi.segment1,
mmt.inventory_item_id,
mmt.revision,
mtln.lot_number,
xx_utility_pkg.get_available_qty(mmt.inventory_item_id,mmt.organization_id,mmt.subinventory_code,mtln.lot_number,'ONHAND') Lot_Onhand,
mtln.attribute1 Heat,
mtln.attribute2 Cert_Site_Number,
mms.status_code,
( SELECT clx.cert_id
FROM xxqc.cert_mst cm,
xxqc.cert_lot_xref clx
WHERE cm.cert_id = clx.cert_id
AND cm.cert_type='MILL'
AND clx.lot_no = mtln.lot_number
) Cert_ID,
mmt.transaction_id,
rsl.po_header_id,
rsl.po_line_id,
mmt.rcv_transaction_id,
rt.shipment_header_id,
rsl.shipment_line_id
FROM mtl_material_transactions mmt,
mtl_transaction_lot_numbers mtln,
mtl_material_statuses_tl mms,
rcv_transactions rt,
rcv_shipment_headers rsh,
rcv_shipment_lines rsl,
mtl_system_items_b msi
WHERE mmt.transaction_id = mtln.transaction_id
AND mmt.organization_id = mtln.organization_id
AND mtln.status_id = mms.status_id
AND rt.transaction_id = mmt.rcv_transaction_id
AND rsh.shipment_header_id = rt.shipment_header_id
AND rsl.shipment_header_id = rsh.shipment_header_id
AND rsh.organization_id = mmt.organization_id
AND rsl.item_id = mmt.inventory_item_id
AND msi.inventory_item_id=rsl.item_id
AND msi.organization_id = mmt.organization_id
AND rsl.po_line_id = DECODE(:P5_PO_LINE_NUMBER, 0,rsl.po_line_id,:P5_PO_LINE_NUMBER)
AND rsl.po_header_id IN ( SELECT po_header_id
FROM po_headers_all
WHERE segment1 = :P5_PO_NUMBER
AND org_id = :P5_ORG_ID)
AND mtln.status_id = 90 -- Which is 'T' Status means Temporary
AND mmt.transaction_action_id = 27
AND mmt.transaction_source_type_id = 1
AND mmt.transaction_type_id = 18
) result
WHERE result.Lot_Onhand > 0
when I use above query I am able to update the region perfectly.
But when I comment last WHERE CONDITION I am getting above problem.
What could be the possilbe reason for this?
Regards
Kiran Akkiraju
Maybe you are looking for
-
I am FURIOUS and have no way to fix this!
First, my applecare ran out YESTERDAY. I refuse to pay for an "incident" when this is entirely Apple's fault!! I have used iTunes since the year it was released. I have over 5000 apps and HAD over 100 playlists. Ever since installing the newest versi
-
What does this error mean? Error in File C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Data\procSched\REPORTING-01.reportjobserver\~tmp814595033916516.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code:
-
Because I am a computer game enthusiast I have for a considerable time a pc alongside my mac. Be fair, there are far more computer games for the pc than for the mac, and in many cases they are cheaper. Recently I got a new iMac with Leopard and Bootc
-
Macbook with Apple 20" Monitor
Wondering if any of you are using Apple's external 20" or 23" monitor connected to the Macbook and using it as a desktop. Some of the questions are: I plan to connect a FW, USB Hub and iSight camera to the Macbook and use completely as a desktop. Cur
-
Unable to Shutdown Hyperion EPM 11.1.3.0 Essbase Server in Linux Environ
Hi Experts, For Essbase start up purpose we have ./startEssbase.sh command is available in Linux Environment. What about to shutdown the Essbase server command in linux env or any other procedure. I am here trying ESSCMD command through cmd prompt. S