Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
I'm sorry, but I don't remember making any edits to my question. –  Mike JM Apr 9 '13 at 12:36
    
Hmmm. sorry, I totally forgot. So. you're an admin. :) –  Mike JM 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.