在oracle的触发器中需要dbms_xmlquery.newContext过程对当前更新的数据转化为XML,但以下代码总提示oracle.xml.sql.OracleXMLSQLException: 索引中丢失 IN 或 OUT 参数,谢谢!!
create or replace trigger TR
after update on main for each row
declare
queryctx dbms_xmlquery.ctxType;
result clob;
l_sql varchar2(300);
begin
l_sql:='select * from wordiv_main where pid=:NEW.PID‘;
queryctx := dbms_xmlquery.newContext(l_sql);
result := dbms_xmlquery.getXML(queryctx);
table2xml(result, 'table2xml.xml');
dbms_xmlquery.closeContext(queryctx);end;
create or replace trigger TR
after update on main for each row
declare
queryctx dbms_xmlquery.ctxType;
result clob;
l_sql varchar2(300);
begin
l_sql:='select * from wordiv_main where pid=:NEW.PID‘;
queryctx := dbms_xmlquery.newContext(l_sql);
result := dbms_xmlquery.getXML(queryctx);
table2xml(result, 'table2xml.xml');
dbms_xmlquery.closeContext(queryctx);end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货