–Write comments in XMLQuery

(:Your Comment HERE:)

Example:

SELECT XMLQuery(

‘for $i in ora:view(“SCOTT”, “DEPT”)/ROW
(:Dept comment:)
return <DEPT id=”{$i/DEPTNO}” DNAME =”{$i/DNAME}” >
{for $j in ora:view(“SCOTT”, “EMP”)/ROW
where $j/DEPTNO = $i/DEPTNO
return <EMP ID=”{$j/EMPNO}” Test=”{if ($param eq “EN”) then “True” else “False”}” ></EMP>
(: Employee Comment:)
}
</DEPT>’
passing cast(‘EN’ as varchar2(10)) as “param”

RETURNING CONTENT).getstringval() a FROM DUAL;

Regards

Mohammad Talat

Advertisements