Home » SQL & PL/SQL » SQL & PL/SQL » failing in Creation of PL/SQL function (PL SQL ORACLE)
icon5.gif  failing in Creation of PL/SQL function [message #671092] Wed, 15 August 2018 08:34 Go to previous message
bench
Messages: 4
Registered: August 2018
Junior Member
Hi there,

I will be thankful to have your suggestion here Smile

im trying to create the bellow function but its created with warnings and im not able to execute it - ORA-06575,
do you have any suggestion? Confused

--------------
Warning: compiled but with compilation errors
Commit complete.

ORA-06575: Package or function CHECK_EVENT_ID is in an invalid state
------------

SQL query:

CREATE OR REPLACE FUNCTION CHECK_EVENT_ID (EVENT_ID_IN NUMBER (18))
RETURN BOOLEAN
IS
COUNTER NUMBER ;
RETURN_VALUE BOOLEAN;
BEGIN
COUNTER := 0;
RETURN_VALUE := 1;
SELECT COUNT (*) INTO COUNTER FROM APE1_RATED_EVENT a where EVENT_ID_IN=a.EVENT_ID;
IF COUNTER=0 THEN RETURN_VALUE:= 0;
END IF;
RETURN RETURN_VALUE;
END CHECK_EVENT_ID;

COMMIT;
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Last 7 days report
Next Topic: Put data from one field to another.
Goto Forum:
  


Current Time: Fri Apr 26 04:51:41 CDT 2024