Hi all,
I create a function like this (I try to recreate my need starting from sample db2 schema):
Then I want to obtain an xmldocument , but if I make this select the BIF XmlElement translate the xml markup symbols <, > into < >
what I'm doing wrong?
many thanks.
I create a function like this (I try to recreate my need starting from sample db2 schema):
Code:
Create or Replace Function testxml1 (Dept char(3) ) Returns Clob(1000000) Language Sql Begin Declare Event CLob(1000000) ; Select XmlSerialize(Xmlagg(xmlRow(workdept as "department", empno As "id", firstnme As "name", lastname As "surname" option row "event") ) as clob ccsid 1208 Excluding Xmldeclaration ) into Event From sample/employee where workdept = dept; Return Event; End ;
Then I want to obtain an xmldocument , but if I make this select the BIF XmlElement translate the xml markup symbols <, > into < >
what I'm doing wrong?
many thanks.
Code:
Select XmlSerialize(XmlElement(name "monthly", testxml1('D11'), testxml1('E21') ) as clob ccsid 1208 including Xmldeclaration ) From Sysibm / Sysdummy1;
Comment