PLS-00222 - No Function With Name Exists In Scope / ORA-06512 No Data Found?

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


ADVERTISEMENT

SQL & PL/SQL :: Function Returning Top Value If Not Exists Then Next One?

Nov 20, 2010

how to write a function that returns top value if not exists then next top for combination of customer_id and hierarchy.For instance :

If I've got table

customer_id ,hierarchy, function_code
123 |1 | Z1
123 |2 |67
123 |3 |5B
678 |10 |S2
678 |11 |Z2
345 |2 |11

For the customer ID 123 I want to return Z1, for customer 678 I want to return S2 and for customer ID 345 I want 11

Problem is that I'm new to the concept of looping. I know how to write a function that accepts customer_id as a value write a cursor and then check IF hierarchy = 1 the return FUNCTION_CODE IF hierarchy - 2 THEN ...

but I need something more universal as some of the customers may have hierarchy function 1 and that would be the top one for him but others might have function of hierarchy 10 as top and checking all of the possibilities using if would be just stupid. So how to write something universal ? And of course if function did not find any customer_id then return null.

View 9 Replies View Related

Application Express :: Display Not-found.png For Image Type When Data Not Found?

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

Function Or Pseudo-column EXISTS May Be Used Inside SQL Statement

Oct 10, 2013

I am encountering error in this code.

WHILE EXISTS ( SELECT * FROM tblOrgChart WHERE fxOrgID = v_chrTempKeyDept )
LOOP
v_intDept := CAST(v_chrTempKeyDept AS NUMBER) + 1 ;
v_chrTempKeyDept := LPAD('',3 - LENGTH(CAST(v_intDept AS VARCHAR2)),'0') || CAST(v_intDept AS VARCHAR2) ;
END LOOP;

Error: PLS-00204: function or pseudo-column 'EXISTS' may be used inside a SQL statement only

View 1 Replies View Related

Table / View V$database Not Found In PL/SQL Function

Feb 18, 2011

I'm trying to create a function that simply returns the current database name (e.g: select db_unique_name FROM v$database ) from a function but when I compile it comes up with :

Error(9,5): PL/SQL: SQL Statement ignored
Error(9,44): PL/SQL: ORA-00942: table or view does not exist

I am compiling and running this as the SYSTEM user and I do think that I need to set privledges/roles, etc to allow this (since I have read that using synonyms in functions/procedures requires permissions...but I cannot seem to find anything that tells me exactly what role/priveledge I need to grant/allow to let this happen.

View 5 Replies View Related

SQL & PL/SQL :: Sub-program Or Cursor (C1) Reference Is Out Of Scope

Feb 19, 2013

When I am executing below code it is working fine

DECLARE
CURSOR C1 IS
SELECT EMPLOYEE_ID FROM EMPLOYEES;
TYPE EMP_ID_TYPE IS TABLE OF EMPLOYEES.EMPLOYEE_ID%TYPE INDEX BY BINARY_INTEGER;
TABLE_EMP_ID EMP_ID_TYPE;
BEGIN

[code].....

But when i am executing below code it is showing error as subprogram or cursor 'C1' reference is out of scope

DECLARE
CURSOR C1 IS
SELECT EMPLOYEE_ID FROM EMPLOYEES;
TYPE EMP_ID_TYPE IS TABLE OF EMPLOYEES.EMPLOYEE_ID%TYPE INDEX BY BINARY_INTEGER;
TABLE_EMP_ID EMP_ID_TYPE;
BEGIN

[code].....

The only difference in above two blocks is that EXIT WHEN Statement.

View 2 Replies View Related

SQL & PL/SQL :: PLS-00653 - Aggregate / Table Functions Not Allowed In Scope?

Jul 8, 2010

I have a function that returns the situation for one month for some database. I need to implement it in some report medium for one year. The one year function works ok.

My problem is when trying to make another function that runs the monthly function 12 times and that error is "PLS-00653: aggregate/table functions are not allowed in PL/SQL scope".am trying to get around some restrictions and somehow until this part things seem to be ok.

I tried to use a union with 12 blocks but it works very slow in the reporting environment and now i want to try to make another function that runs another function 12 times depending on the parameter.

here is the code (there might be some name misuse since i had to change the names of the original code -

CREATE OR REPLACE
FUNCTION anual(monthh in varchar2, year IN VARCHAR2)
return anual_REP_var PIPELINED is
BR anual_REP:=anual_REP(NULL,NULL, NULL,NULL);
contor INT(2);

[code]...

View 2 Replies View Related

SQL & PL/SQL :: How To Retrieve Data That Does Not Exists In A Table

Dec 13, 2011

I have the following table with the some sample data:

|| Filename || receiving_site || originating_site ||
| fileA | siteA | HQ |
| fileA | siteA | siteA |
| fileB | siteA | HQ |
| fileA | siteB | HQ |
| fileA | siteB | siteB |
| fileB | siteB | HQ |
| fileB | siteB | siteB |

The table works in such way:

1. For each of the Filename, if originating_site is not the same as receiving_site, it means that the file has been sent to receiving_site but has not been acknowledged received yet.

2. For each of the Filename, if originating_site is the same as receiving_site, it means the file has been sent and received by the receiving_site.

My task is to list out all the Filename per receiving_site that has been sent, but not received yet by the receiving_site. For example from the sample data above, I am expecting to see that siteA, fileB has not been received yet.

How can I do that? I had tried MINUS and NOT EXISTS command, but I am just not able to get the result that I want.

View 2 Replies View Related

SQL & PL/SQL :: ORA-01403 / No Data Found

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

PL/SQL :: ORA-01403 / No Data Found

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

SQL & PL/SQL :: Null Value - No Data Found

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

Replication :: ORA-01403 / No Data Found

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

SQL & PL/SQL :: ORA-01403 - No Data Found In Procedure

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

SQL & PL/SQL :: No Data Found Error In Trigger (After Or Before)?

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

SQL & PL/SQL :: Associative Array - No Data Found

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

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 View Related

Table Has 2 Records With User ID - No Data Found

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

SQL & PL/SQL :: Error In Trigger ORA-01403 - No Data Found

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

PL/SQL :: Cursor Went To Exception When It Got Error / No Data Found

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

PL/SQL :: 01403 Data Not Found With Cursor / Array?

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

Application Express :: ORA-01403 / No Data Found

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

SQL & PL/SQL :: Get Node Name From Each Record - ORA-31186 And ORA-06512

Apr 9, 2010

I have xml data in one oracle table as records. I want to get the node name from each record (Next node of rowset and row). Total no.of records in oracle table is 15465. By using for loop i have try to get this but got the following error.

code is...

1 CREATE OR REPLACE PROCEDURE DDI_TEST.SCHEMA_IMPORT9
2 AUTHID CURRENT_USER
3 AS
4 V_Xml XMLTYPE;
5 V_Xml_Ind XMLTYPE;
6 V_Node VARCHAR2 (50);
7 V_Cnt NUMBER := 1;

[code]....

ERROR is..

ORA-31186: Document contains too many nodes
ORA-06512: at "SYS.XMLTYPE", line 111
ORA-06512: at "DDI_TEST.SCHEMA_IMPORT8", line 18
ORA-06512: at line 1

Even i used one more 'for loop' (at line 18 )to get additional nodes, same thing happens.

View 5 Replies View Related

Reports & Discoverer :: How To Handle No Data Found In Rdf Query

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

Security :: How To Replace No Data Found Keyword In Oracle

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

Forms :: Finding Node In A Tree - No Data Found?

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

Connect To DB With Other User Giving Error ORA-06512?

Sep 14, 2012

I have written a trigger as below:

CREATE OR REPLACE TRIGGER LOGONTRIG
AFTER LOGON ON DATABASE
DECLARE
v_temp NUMBER;
V_bypass_trg_flag VARCHAR2(1);

[code],...

This trigger got successfully compiled. and when am trying to connect to the db with other user its giving me error "ora-06512 : at dbms_session".When i grant dba privillage to that user am successfully able to login to db.

View 2 Replies View Related

SQL & PL/SQL :: Ora-12516 / Ora-06512 After Repair Chained Rows?

Feb 17, 2010

On the weekend, I ran the repair chained rows in Toad and compile invalid objects in Toad.I don't know this problem is associated with that job, it has no problem first day and today some problem was detected from customer side. It shows Ora-12516 and Ora-96512, I will attach package sql and error screen shot, could you interpret what is wrong with the Oracle?

I can post up screen shot cause I don't have right.It was Korean and if I translate to English, kind of "Server can't proceed - Ora-12516 TNS: listener can't find appropriate handler with protocol stack.

Ora-06512: "CWMED.PKG_MEDI_AS_TOCALL" line 226
Ora-06512: "CWMED.PKG_PDA_MEDI_AS" line 1765
Ora-06512: "line 1".

View 5 Replies View Related

Security :: ORA-06512 While Installing Datavault On 11g Database

Aug 7, 2013

While installing datavault on 11g database, getting error in between the process. Error is as below -

ORA-01031: insufficient privileges
ORA-06512: at "DVSYS.DBMS_MACADM" line 1740
ORA-06512: at line 1

how to rectify the problem.

I used the below link for configuring database vault on existing database.{URL]////

View 3 Replies View Related

SQL & PL/SQL :: Select Data From Test-1 Table Where ID Values In Table Exists In 2?

Aug 31, 2010

I have the below data in table test_1.

select * from test_1
IDNameTotal
-----------
1A100
2B100
3C100
4D100

test_2 table contains the concatination of ID's with comma seperated. Actually in this table ID column is of datatype varchar2.
select * from test_2
ID
----
1,2,3

My requirement is to select the data from test_1 table where the id values in this table exists in test_2 table. I tried with the belowselect statement, but could not get any data.

SELECT * FROM test_1 WHERE to_char(id) IN (SELECT id FROM test_2)

create table test_1 (id number, name varchar2(100), total number)
create table test_2(id varchar2(100))
insert into test_1 values (1,'A',100)
insert into test_1 values (2,'B',100)
insert into test_1 values (3,'C',100)
insert into test_1 values (4,'D',100)

View 4 Replies View Related

Change Code To Make Exception Print When No Data Is Found?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved