gpt4 book ai didi

database - LS-00103 : Encountered the symbol "end-of-file pragma procedure form

转载 作者:行者123 更新时间:2023-12-02 10:48:29 27 4
gpt4 key购买 nike

CREATE OR REPLACE PACKAGE emp_package AS
TYPE emp_data_type IS RECORD (
emp_number NUMBER,
hire_date VARCHAR2(12),
emp_name VARCHAR2(10));
PROCEDURE get_emp_data
(emp_data IN OUT emp_data_type);
END;

/

package was created SQL>


  CREATE OR REPLACE PACKAGE BODY emp_package AS
PROCEDURE get_emp_data
(emp_data IN OUT emp_data_type) IS
BEGIN
SELECT empno, ename, to_char(hiredate, 'DD/MON/YY')
INTO emp_data
FROM emp
WHERE empno = emp_data.emp_number;
END;

/

警告:创建的包主体存在编译错误。

SQL> show error; Errors for PACKAGE BODY EMP_PACKAGE: LINE/COL ERROR


9/4 PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin end function package pragma procedure form



任何人都可以帮助解决此错误

最佳答案

END;更改为END get_emp_data;然后添加END emp_package;
这样做的目的是要指示第一行结束该过程的定义,而不是主体本身,而第二行指示包主体定义的末尾。

关于database - LS-00103 : Encountered the symbol "end-of-file pragma procedure form,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24689595/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com