hi I tried the following function , FUNCTION is creating fine but getting the error while executing...
SQL> create or replace FUNCTION getPmnOrgRow(empId emp.EMPNO%TYPE)
2 RETURN EMP%ROWTYPE
3 IS
4 result EMP%ROWTYPE;
5 BEGIN
6 SELECT *
7 INTO result
8 FROM EMP
9 WHERE EMPNO = empId;
10 RETURN result;
11 EXCEPTION
12 WHEN NO_DATA_FOUND THEN
13 raise_application_error(-20100,'error');
14 RETURN NULL;
15 END;
16 /
Function created.
SQL> select getPmnOrgRow(7566) from dual;
select getPmnOrgRow(7566) from dual
*
ERROR at line 1:
ORA-00902: invalid datatype