[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.

10/09/2009 at 10:40AM PDT, ID: 24799987 | Points: 500
[x]
Attachment Details

Multiple schema function

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;
/
[+][-]10/10/09 12:36 AM, ID: 25541191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625