2013-06-03 53 views
1

我試圖編譯這個包體:錯誤:符號「(」被取代「VARCHAR2」繼續

CREATE OR REPLACE PACKAGE BODY package_1 AS 
PROCEDURE procedure_1 (P_HOST IN VARCHAR2, P_USER IN VARCHAR2, P_NAME IN VARCHAR2) 
IS 
BEGIN 
SELECT HOSTNAME, USERS, PS_NAME 
INTO P_HOST, P_USER, P_NAME 
FROM PS_COLLECT 
WHERE NOT EXISTS 
( 
    SELECT HOSTNAME, USERS, PS_NAME 
    FROM PS_MASTER 
    WHERE PS_MASTER.HOSTNAME = PS_COLLECT.HOSTNAME 
    AND PS_MASTER.USERS = PS_COLLECT.USERS 
    AND PS_MASTER.PS_NAME = PS_COLLECT.PS_NAME 
); 
END procedure_1; 
END package_1; 

但我收到此錯誤

The symbol "(" was substituted for "VARCHAR2" to continue. 

我是newbie int PL/SQL ..請幫助:)

回答

0

我不希望這會導致您所看到的確切錯誤,但您的代碼的一個明確問題是,您正在爲參數指定IN模式,但Ť試圖在程序中爲它們分配值。它看起來像你應該改變模式爲OUT所有三個參數(在標題和正文)。

如果這樣不能解決您的問題,我建議發佈CREATE PACKAGE和CREATE PACKAGE BODY語句的修改後的文本。