**create or replace procedure Xml_Table is
begin
DECLARE
l_xmltype XMLTYPE;
BEGIN
SELECT XMLELEMENT("employees",
XMLAGG(
XMLELEMENT("employee",
XMLFOREST(
e.empno AS "empno",
e.ename AS "ename",
e.job AS "job",
TO_CHAR(e.hiredate, 'DD-MON-YYYY') AS "hiredate"
)
)
)
)
INTO l_xmltype
FROM emp e;
INSERT INTO xml_tab VALUES (1, l_xmltype);
COMMIT;
end Xml_Table;**
在这个Xml_Table中是我创建的过程。和Xml_tab是我在数据库中创建的xml数据类型的表。还有一个问题是我有一种方法可以创建一个过程pl / sql,我可以在其中删除并创建新的xml类型表而不是在过程之外执行它。
ERROR MESSAGE:PROCEDURE APPS.XML_TABLE的编译错误
错误:PLS-00103:遇到以下任何一种情况时遇到符号“文件结束”:
( begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << continue close current delete fetch lock
insert open rollback savepoint set sql execute commit forall
merge pipe purge
答案 0 :(得分:0)
Try this:
create or replace procedure Xml_Table as
/*
begin --> REMOVE
DECLARE --> REMOVE
*/
l_xmltype XMLTYPE;
BEGIN
...