SQL & PL/SQL :: Procedure Returning No Data Found
Dec 13, 2011
I have a stored procedure that is returning no data. I have read this is most common in stored procedures that use a SELECT INTO that tries to put a null in the variable.First, the stored procedure (from SQL Developer) then th execute and error.
PROCEDURE prc_add_address (addr_id OUT integer, addr_type_id IN integer, addr_line_1 IN varchar2,
addr_line_2 IN varchar2 := null, addr_line_3 IN varchar2 := null,
prov IN varchar2 := null, zip_id IN number,
country_cd IN varchar2 := 'USA', addr_start_date IN date,
addr_end_date IN date := null, changed_by IN varchar2,
changed_date IN date, channel_txt IN varchar2 := null)
[code]....
The sad conclusion:
Error starting at line 1 in command:
declare addrid integer := 0;
BEGIN
pkg_vic_person.PRC_ADD_ADDRESS (addrid, addr_type_id => 1, addr_line_1 => '351437 Tall Blvd', zip_id => 14906, addr_start_date => '01-FEB-2011', changed_by => 'RS', changed_date => sysdate);
[code]....
View 6 Replies
ADVERTISEMENT
May 4, 2010
In a procedure I try to make the following select :
select param_value
into vc_param
from cont_rp_serv where rp_serv_code = 36
and contract_id = 134
and rownum < 2;
But I receive ORA-01403: no data found.
If i run the select normally in a separate window in the same time I got the expected result : Enterprise.
I have checked that table is not locked by another user. Also i do not use triggers at all to get here.
View 4 Replies
View Related
May 22, 2013
I have an Image Type on a forum page. I want a default "not-found" image to display if the BLOB column value is null or if there is no data for that search value. The image is stored with the app: #APP_IMAGES#not-found.png
APEX 4.2 (with listener) on Oracle 11gR2
View 10 Replies
View Related
Oct 23, 2009
I would like to create some PL/SQL procedures that return XML as CLOB parameters. I want to just do this (which works fine with simple tests):
create or replace procedure p_xml_test_1(
p_xml out nocopy clob
) is
begin
p_xml := '<?xml version="1.0" encoding="utf8" ?>' ||
'<test><something>some value</something></test>';
end p_xml_test_1;
But I have access to some other source code that basically does this:
create or replace procedure p_xml_test_2(
p_xml out nocopy clob
) is
lv_xml clob;
begin
dbms_lob.createtemporary(
[code]......
I'm wondering if the first method will cause any problems for me down the road. Is it ok to do it that way? What is the advantage, if any, to the second method?
View 1 Replies
View Related
May 23, 2011
using dbms_profiler for a package having procedure returning sys_refcursor.
I have 2 procedure in a package. let say, proc1 and proc2 ( also proc1 is called inside from proc2)
proc1 has no parameter
proc2 has 2 paramter proc2(p_num in integer, p_data out sys_refcursor) [ in which we pass the p_num (ex: 1) and it run to get the data from the tab le and return that data through sys_refcursor.
for proc1, I am able to use dbms_profiler as below and it is working fine
-------------
DECLARE
l_res BINARY_INTEGER;
BEGIN
l_res := DBMS_PROFILER.start_profiler(run_comment => 'package.proc1: ' || SYSDATE);
package.proc1;
l_res := DBMS_PROFILER.stop_profiler;
END;
/
-------------
but for proc2, i am unable to use dbms_profiler, how to use dbms_profiler for procedure returning sys_refcursor.
i tried using as below:
-------------------------------
DECLARE
l_res BINARY_INTEGER;
P_NUM NUMBER;
P_DATA SYS_REFCURSOR;
[code]....
getting error: PLS-00312: a positional parameter association may not follow a named association
View 1 Replies
View Related
Apr 29, 2010
I created a table and some type definitions in oracle 10.2.0.3 DB as follows. There is also a procedure that I defined and is shown below.
SQL> create table test_proc
(
test_name varchar2(10),
test_ver number (3,3),
active_flag number(2)
);
Table created.
SQL> select * from test_proc;
TEST_NAME TEST_VER ACTIVE_FLAG
---------- ---------- -----------
AFP 1.5 2
PSA 11.89 0
EHIV 99.5 3
aHAVM 1.45 9
[code]....
Now from Pro*C function I want to pass a similar array of structure to this procedure and return it via the out parameter of the procedure back to Pro*C. How do I do it?
I am using the attached program but its giving me compiler error as follows..
Error at line 31, column 1 in file sample.pc
proc_modify_tdefs (:in_tdefs,:out_tdefs);
1
PLS-S-00306, wrong number or types of arguments in call to 'PROC_MODIFY_TDEFS'
Error at line 31, column 1 in file sample.pc
proc_modify_tdefs (:in_tdefs,:out_tdefs);
[code]....
View 2 Replies
View Related
Jan 30, 2007
I work on a client-server application, where users need to be able to run rather complex queries.
We currently have most of the queries defined in views on the Oracle database server and the client application simply downloads the data (i.e. SELECT * from example_view). This is good for us as we can maintain these queries without releasing new versions of the client tool.
However we have some queries implemented by a colleague that have caused a lot of trouble (efficiency and quality) and these are stored client-side.
The issue I have is that these client side queries can return records in different units (i.e. in standard cubic metres, or barrels of oil etc), as the SQL is defined at runtime on the client, and I want to know the best way to replicate this with SQL stored server-side.
The client-side SQL has column definitions such as: SELECT oil_production * decode(&unit,'Nm3',.948,'Sm3',1,'MMBOE',6.0924,1) ... The &unit parameter is then replaced by the appropriate text (i.e. 'Sm3') before the query is sent to Oracle.
Is there anyway to pass variables to server-side SQL and get a recordset back? I don't think PL/SQL procedures can do this? and views can't contain bind variables.
View 1 Replies
View Related
Jul 14, 2010
I'm trying to debug this function to get the desired results. See attachment for the function code and the test data insert script.
----Create Test Table
CREATE TABLE VC_WORKINGDAYS
(
WK_ID number NUMBER(10,0),
WK_DATE DATE,
);
-- Insert test Data
INSERT INTO VC_WORKINGDAYS_1 VALUES (308, '25-MAR-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (316, '06-APR-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (324, '18-APR-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (332, '03-MAY-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (340, '13-MAY-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (348, '25-MAY-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (356, '06-JUN-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (364, '16-JUN-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (372, '28-JUN-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (380, '08-JUL-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (388, '20-JUL-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (396, '01-AUG-11');
INSERT INTO VC_WORKINGDAYS_1 VALUES (404, '11-AUG-11');
SQL
----- Result Should be WHY
SELECT (VC_CALC_WD_DATE(LAST_DAY(TRUNC(SYSDATE)),1)) FROM DUAL 14/JUL/10 15/JUL/10 is 1 working day from today
SELECT (VC_CALC_WD_DATE(LAST_DAY(TRUNC(SYSDATE)),2)) FROM DUAL 14/JUL/10 16/JUL/10 is 2 working days from today
SELECT (VC_CALC_WD_DATE(LAST_DAY(TRUNC(SYSDATE)),3)) FROM DUAL 14/JUL/10 19/JUL/10 is 3 working days from today
Attached File(s)
create_Function.zip ( 6.39K )
Number of downloads: 1
InsertData.txt ( 84.34K )
Number of downloads: 0
View 1 Replies
View Related
Aug 10, 2010
I have a problem with a package that generate reports.
ORA-01403: no data found
This is the first error rule.
p_pte_tab( r_sales.product_type ).shipped_units := p_pte_tab( r_sales.product_type ).shipped_units + r_sales.shipped_units;
From the next procedure (the whole package is a bit too large to post) :
procedure sales_report_2hnd( p_running_date date )
is
cn_procname constant varchar2(61) := 'sales_report_2hnd';
t_error_rec bol_exceptions.error_rec_type;
cursor c_rpt
is
[code]....
I thought there was a NULL record for shipping units but thats not the case.
View 5 Replies
View Related
Aug 3, 2012
I'm using Oracle database10g.
I have a table called T1 with column C1
ORA-01403: no data found.
I know when I create a trigger I reference the new and old values using :NEW.C1 & :OLD.C1.
What about of the value is not changed and I still want access it what is the syntax.
View 2 Replies
View Related
Dec 8, 2011
I'm making PL/SQL function. Slice of
dbms_lob.append(temp_clob,to_clob(' <property>'||crlf));
fol:=lb_folios.get_chap1_sec1(folioid);
fetch fol into recid,rec_nr,text,shares,obj_size,monetary_sum,rec_status;
if fol%found then
dbms_lob.append(temp_clob,to_clob(' <chap1_sec1>'||crlf));
[Code]....
And I have error on "select jnl_id into jid" this line. And the error text is "no data found". And I know that there is no data in the table column jnl_id.
View 7 Replies
View Related
Nov 27, 2008
In multimaster replication, I am getting the following error in the master sites.
ORA-01403: no data found
ORA-01403: no data found
But when i checked for the data, I found that the records are present.
View 6 Replies
View Related
May 10, 2013
We have the following trigger in database, whenever we try to insert the record in WIP_OPERATIONS , NO DATA FOUND exception has been thrown, when we debugged, we did not find any issue. The first select statement is getting failed even though there is the value coming for :NEW.wip_entity_id and when we execute the query separately in database with the :NEW.WIP_ENTITY_ID, its getting the value. What could be the reason? Can't we use SELECT Statement in AFTER or BEFORE INSERT trigger?why its throwing NO_DATA_FOUND Exception?
CREATE OR REPLACE TRIGGER sdm_brasil_wj_ops_iface_trg
BEFORE INSERT OR DELETE
ON WIP_OPERATIONS
REFERENCING
[code...
View 15 Replies
View Related
Dec 28, 2012
find the sample of code which is giving me the same error. whts wrong with below piece of code.
Programe
declare
cursor c1 is select * from x1;
l_x1 type1;
[Code]....
View 3 Replies
View Related
Mar 11, 2011
i got a prob in executing a query in my oracle.TRANSACTIONLIST is the table and my query is..
select * from TRANSACTIONLIST where USER_ID = '07751A1247'the table has 2 records with that user id.
But it is given result as "no data found".
View 4 Replies
View Related
Apr 4, 2011
I got this error on the code below when i insert for example a record in a table "pedidos_teste" (insert into sgc_supergestor.pedidos_teste select * from sgc_supergestor.pedidos where IDPC=181 and IDPEDIDO=48 )
Below is the error: ORA-1403: ORA-01403: no data found
CREATE OR REPLACE TRIGGER SGC_SUPERGESTOR.pedidos_teste_I_U_D
after INSERT OR DELETE OR UPDATE ON SGC_SUPERGESTOR.PEDIDOS_TESTE
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
[code]....
View 6 Replies
View Related
Jul 7, 2012
My cursor went to the exception when its got the error " ORA-01403: no data found"
But my cursor need to run even though it got the error " ORA-01403: no data found"...This is my exception part
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (c1rec);
DBMS_OUTPUT.put_line (SQLCODE);
DBMS_OUTPUT.put_line (SQLERRM);
-- RETURN NULL;
-- code change added as part of GCA642 -- END
END get_geo_test1;
View 14 Replies
View Related
Feb 7, 2013
have a cursor populating an array displaying data not found. As usual with these things, a few displays normally show the offending row but in this case, the display is showing data so I dont understand it. Ive inherited this and shortened it a bit to display whats going on.
declare
v_errno number;
cursor c1 is <really big sql statement>;
[Code]...
now we come to run it, I tried first to see was it data and then I outputted the iteration itself. the first iteration is fine, the second iteration shows the column in the array has data but Im still getting the 01403.
the error can be generated even displaying the array value. If the array wasnt populated I wouldnt expect the col value to display in the error.
exec my_proc;
iteration : 1, col1 value : 43
Error iteration : 2, col1 value : 43);
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "my_proc", line 34
ORA-06512: at line 1
View 1 Replies
View Related
Nov 26, 2012
if I click button RUN here -> f?p=4000:1500 i have error: ORA-01403: no data found
Problem is if I set Application - BuilderApplication xxx - User Interfaces - User Interface Details - Home URL = f?p=&APP_ALIAS.:2:&SESSION. (&APP_ALIAS searched alias for apex builder).
View 0 Replies
View Related
Aug 15, 2012
Here is my req - There are 2 columns C1, C2 - both of which capture a different set of values in 2 seperate custom oracle apps forms.
I have a RDF query to get the result set of C1,C2.
When this query does not return any values I need to look in form 2 and handle each value of C1 separately. I do not know how to achieve this with formula column - since I can perform checks/validations on the data returned by the query using a formula column.
View 3 Replies
View Related
May 30, 2013
i have a table that contains employee id, employee name , so if i gave the correct employee id in where clause of select statement it will show employee name, in case if i give the employee id that does not exist in the table it will show 'Employee name is not found'..
View 2 Replies
View Related
Mar 5, 2012
I have a problem with finding a node in my tree, but when I click the find button, it threw a message NO DATA FOUND.
here is the code that I used in find button:
DECLARE
tri ITEM;
hanapin_mYnode FTREE.NODE;
BEGIN-- Find the tree itself.
[code]...
View 1 Replies
View Related
Apr 22, 2009
I am developing a 3-tier based website having Oracle 10g DB at back end. Firstly, i created a pl/sql stored procedure as:
create or replace procedure CheckLogin(u_name in varchar2, u_pwd in varchar2,is_admin in number) is
uname varchar2(30);
upwd varchar2(30);
begin
[code]...
View 1 Replies
View Related
Feb 28, 2011
I have the following chunk of code, which could return no rows, one row or many rows. When it returns one or many rows the DBMS_OUTPUT.PUT_LINE prints out my values. When no data is found 'Hello' is not printed?
Suggest a way I can change the code to make the exception print when no data is found?
SET SERVEROUTPUT ON;
BEGIN
FOR prec IN ( select * from xxx.part_maint where drop_partition = 'Y' )
LOOP
DBMS_OUTPUT.PUT_LINE (prec.SCHEMA_NAME || ' ' || prec.OBJECT_NAME);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE ('hello');
END;
View 1 Replies
View Related
Jul 1, 2013
I am trying to create an anonymous PL/SQL block to output privilege information for each of the users listed in DBA_USERS In a loop. This is my block so far (not finished):
declare
v_usr varchar2(30);
v_out_header varchar2(100);
[Code]....
The output is as follows:
***User-Role Privilege report***
-----------------------------------
username: ANDREY , profile: DEFAULT
SYSTEM privileges granted directly to the user(not through ROLE) :
no_data_found
A problem I am encountering is that for some users I have no direct privileges that are not granted through roles, And when I have the expression v_qry (which is basically "'select grantee ||'',''|| privilege from DBA_SYS_PRIVS where grantee not in (select role from dba_roles) and grantee ='||'''' ||v_usr||''''") not initialized with values because the select statement retrieved 0 results, I have the process interfered by the no_data_found error/exception.
Questions: how I can preferrably simply, avoid/overcome my problem? Some way to make the loop go on in spite of no data found? maybe something similar to NVL?
View 14 Replies
View Related
Nov 29, 2012
We just did an upgrade to 4.2 on a new WebLogic server. We are using the latest Apex Listener as well.The install seemed to go well (no errors during the DBA install) and we configured the Listener to connect to the database using the basic connection settings.I was able to login to the Admin console and create my workspace and users, but I cannot even get the workspace login screen to appear.All we get it is:
Error Error processing request.
ORA-01403: no data found
This is the only thing that shows up when going to the default Apex URL....
View 6 Replies
View Related
Jun 7, 2011
I am using oracle 10g i have a table on my computer that i made for a friend when i load it on their computer the select statements say no data found if i use select * from table name all the data will show
if a column name select * from table name where duty_date = '05-JAN-11'no data found
View 1 Replies
View Related
Sep 20, 2013
how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me.
xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>.
View 3 Replies
View Related
Oct 16, 2012
Not able to understand what's wrong with the code. I am trying to import data to a table using a CSV file. I have exported the data (CSV) from the interactive report and I am just trying to insert the same data to the table, through a process. When, I tried to do so; its throwing an error message saying NO_DATA_FOUND and file is not getting inserted into wwv_flow_files table.
But when I removed the data from the CSV file for the comments field and then tried importing the file, the process worked. I don't understand whats the problem with the code.
I have a sample app setup in my workspace for this weird problem.
[URL]
Workspace details:
CSV file with comments field and data in it - when trying to import - throws an error message NO_DATA_FOUND
CSV file with comments field and without data in it - tried importing - this worked
View 2 Replies
View Related
May 10, 2013
I thought this was the easy bit in APEX when you just create a form based on a table, with some validations etc. and use it to insert,update data. However on inserting the first record, I get the following error:
is_internal_error: false
ora_sqlcode: 100
ora_sqlerrm: ORA-01403: no data found
[Code]....
The form is based on a table with a primary key and the primary key is populated from an APEX-generated sequence.
I tried recreating the form, but still no good and now I get the no data error even when clicking "RUN" at page level, so the page does not even display.
View 1 Replies
View Related