Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Accessing tables in another schema from a package

Accessing tables in another schema from a package

From: <runesl_at_my-dejanews.com>
Date: Tue, 09 Jun 1998 02:55:26 GMT
Message-ID: <6li86u$v08$1@nnrp1.dejanews.com>


Hi!

I have two schemas adb and cdb on the same Oracle 7.3 server. In the adb schema I have created a package with a procedure which tries to access data from a table in the dfo schema. When I try to create the package, I'll get the errors shown below.

Anybody know how to refer to a table in another schema? The insert statement works fine alone in SQL+, logged in as the same user who tries to create the package below.

SQL> create or replace package QA as
  2
  2 procedure cable_segregation_level_nn;   3
  3 end QA;
  4 /

Package created.

SQL> show errors package QA;
No errors.
SQL>
SQL> create or replace package body QA as   2
  2 procedure cable_segregation_level_nn is   3 begin
  4
  4 insert into adb.qa_errors (id,msg,prio,identified_date)   5 select tag,'SEGREGATION_LEVEL is mandatory.',3,SYSDATE   6 from dfo.cable
  7 where segregation_level is NULL;
  8
  8 end cable_segregation_level_nn;
  9
  9 end QA;
 10 /

Warning: Package Body created with compilation errors.

SQL> show errors package body QA;
Errors for PACKAGE BODY QA:

LINE/COL ERROR

-------- -----------------------------------------------------------------
4/1      PL/SQL: SQL Statement ignored
6/6      PLS-00201: identifier 'DFO.CABLE' must be declared

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Jun 08 1998 - 21:55:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US