I want to combined mulitple exisiting XML files into one XML output file.
I am a new developer and still learning.
I have a table with four columns - ROWID, XMLMESSAGE, BUS_DTE, DW_LOD.
I want to write a query in teradata that will put several XML messages into one single XML output message.
My current approach is:
SELECT XMLSERIALIZE(
DOCUMENT XMLELEMENT(NAME "XML_MESSAGES",
XMLAGG(XMLMSG)
) AS VARCHAR(20000)
) AS transactions_xml
FROM <Database.Table>;
All I get is syntax after syntax error after every edit I make, and I am not sure on how to approach this problem.
Any guidance is hugely appreciated.