错误:符号“(”代替“VARCHAR2”继续

时间:2013-06-03 01:26:22

标签: plsql

我正在尝试编译这个包体:

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.

我是PL / SQL的新手。请帮助:)

1 个答案:

答案 0 :(得分:0)

我不希望这会导致您看到的确切错误,但您的代码的一个明确问题是您正在为参数指定IN模式,但之后尝试在其中为其分配值程序,流程。对于所有三个参数(在标题和正文中),您似乎应该将模式更改为OUT

如果仅此问题无法解决您的问题,我建议发布CREATE PACKAGE和CREATE PACKAGE BODY语句的修改文本。