Hello,
With this SQL in RPG I'm using it to creat a clob in the IFS:
SELECT XMLSERIALIZE(XMLDOCUMENT(
xmlelement(name "list",
xmlelement(name "cuso", a.cuso),
xmlagg(xmlelement(name "line", b.ordl55) order by b.ordl55))
) as varchar(10000) ccsid 37)
as response
INTO :ResultCLOB
FROM tedi36pf a, oep55 b
where a.cono = '60'
AND b.cono55 = a.cono
AND b.ordn55 = SUBSTR(a.cord, 3, 7)
group by a.cuso
Only the first line is in the XML, how can I group it in a higher lever tag like "group" for example?
FIle B has multiple records per each of file A
Any help would be appreciated
regards
With this SQL in RPG I'm using it to creat a clob in the IFS:
SELECT XMLSERIALIZE(XMLDOCUMENT(
xmlelement(name "list",
xmlelement(name "cuso", a.cuso),
xmlagg(xmlelement(name "line", b.ordl55) order by b.ordl55))
) as varchar(10000) ccsid 37)
as response
INTO :ResultCLOB
FROM tedi36pf a, oep55 b
where a.cono = '60'
AND b.cono55 = a.cono
AND b.ordn55 = SUBSTR(a.cord, 3, 7)
group by a.cuso
Only the first line is in the XML, how can I group it in a higher lever tag like "group" for example?
FIle B has multiple records per each of file A
Any help would be appreciated
regards
Comment