|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by bungy_1 in KornShell (ksh), JAXP & SAX (XML APIs)
Trying to write a PLSQL function in Shema A and select data from Schema B. I have read privileges in scheam B but cannot create a function.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
|
CREATE OR REPLACE FUNCTION SCHEMA_A.GET_DEPT (EMP_NO varchar) RETURN NUMBER IS
DEPARTMENT NUMBER;
BEGIN
select DEPARTMENT INTO DEPARTMENT
from SCHEMA_B.EMPLOYEE_TBL
where EMP_NO = (EMP_NO);
RETURN DEPARTMENT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
RAISE;
END GET_DEPT;
/
|
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625