1

There are 2 Oracle databases with pseudo names Remote and Local. I have a function in Remote called FUS.F_Return_10 which simply returns 10 for testing purposes, where FUS is a schema name. In Local I want to create a procedure that will call the above function. Here's the PL/SQL:

CREATE OR REPLACE PROCEDURE TEST
(
 V_COUNT OUT NUMBER
)
AS
 V_FOO NUMBER(2,0);
BEGIN
 V_FOO:= FUS.F_Return_10@PER_ACC;
  SELECT COUNT(*) INTO v_count FROM persons WHERE DEPID=V_FOO;
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_count :=0; 
END;

There's a Public Database Link called PER_ACC in Local. When I try to create this procedure I get: Encountered symbol "@" when expecting one of the following: .(*%&................

I'm executing this code in SQL Developer

Can you tell me where my mistake is?

  • I'm sorry, but I don't remember making any edits to my question. – Mikayil Abdullayev Apr 9 '13 at 12:36
  • Hmmm. sorry, I totally forgot. So. you're an admin. :) – Mikayil Abdullayev Apr 9 '13 at 12:41
  • @YasirArsanukaev When can you ever be sure you won't edit a post any more? In my opinion Mike JM's edit was fine and preferable to adding a comment. I often edit questions after posting them and have never hit the switch to wiki threshold (10 I think). – Leigh Riffel Apr 9 '13 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.