Home » SQL & PL/SQL » SQL & PL/SQL » error PL/SQL select with database link
error PL/SQL select with database link [message #36152] Wed, 07 November 2001 22:09 Go to next message
Beate Ries
Messages: 1
Registered: November 2001
Junior Member
Hello friends,
i created a PL/SQL script for a database oracle 8.1.7. The declaration part is:
declare
cursor seq_cursor is
select guid.nextval from dual;
seq_val seq_cursor%rowtype;
cursor count_cursor is
select * from remote_tablename@waw;
count_val count_cursor%rowtype;
begin ...

The select statement with databaselink "select * from remote_tablename@waw" is working fine outside of the PL/SQL script. The link connects to an oracle 7 database. But when i execute the select statement in the PL/SQL script i get the following errors:
ORA-04052: error occurred when looking up remote object DFG.WAW_STATUS@WAW.WORLD
ORA-04029: error ORA-904 occurred when querying ORA_KGLR7_DEPENDENCIES@WAW.WORLD
ORA-00604: error occurred at recursive SQL level 1 ORA-00904: invalid column name

Doesn't work it because it is an oracle 7 database? I can't create the view "ORA_KGLR7_DEPENDENCIES" on the oracle 7 database (catrpc.sql).

Can any one help?

Thanx in Advance.
Beate

----------------------------------------------------------------------
Re: error PL/SQL select with database link [message #36157 is a reply to message #36152] Thu, 08 November 2001 02:38 Go to previous message
Hans
Messages: 42
Registered: September 2000
Member
I don't know if the code below works but try it
 
create or replace view v_remote_table as
      select * from remote_tablename@waw;

declare
   cursor seq_cursor is
      select guid.nextval from dual;
 
   seq_val seq_cursor%rowtype;
 
   cursor count_cursor is
      select * from v_remote_tablename;
      
   count_val count_cursor%rowtype;
begin ...


----------------------------------------------------------------------
Previous Topic: How to know the number of affected rows?
Next Topic: how to? on insert a record to parent > insert to child also
Goto Forum:
  


Current Time: Thu Mar 28 12:41:47 CDT 2024