troubleshooting Question

Function Execution

Avatar of samisyed
samisyed asked on
Oracle Database
2 Comments1 Solution849 ViewsLast Modified:
create or replace function test1(no number)
return boolean
is
name varchar2(20);
begin
select ename into name from emp where empno=no;
IF SQL%ROWCOUNT>=1 THEN
RETURN(TRUE);
END IF;
EXCEPTION
            WHEN NO_DATA_FOUND THEN
            RETURN (FALSE);
END;
/

This function is created, but when i executed using following select statement  error is getting :

SQL> SQL> SQL> select test1(7743) from dual;
select test1(7743) from dual
       *
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type

Plz, let me know how to correct it.

Thanx.




Plz
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros