I am running a query that returns XML data and spools to a file. I'm having a problem where the output of the query is being truncated. Here's what it looks like:
XMLDATA
----------------------------------------
<?xml version="1.0" standalone="yes"?>
<msgs>
<msg>
<PNUM>ABC12345
What I am expection was something like this:
XMLDATA
----------------------------------------
<?xml version="1.0" standalone="yes"?>
<msgs>
<msg>
<PNUM>ABC1234567</PNUM>
<MSG_ID>1234</MSG_ID>
<NAME>Test message</NAME>
<TEXT>This is the main content of the message</TEXT>
</msg>
<!-- about 60 other msg elements -->
</msgs>
The select
statement is simple enough:
select xmlroot(xmlelement("msgs",xmlagg(xmlelement("msg",xmlforest(PNUM , MSG_ID , NAME, TEXT)))), VERSION '1.0', STANDALONE YES) xmldata
from ...
I am guessing there's some sqlplus formatting trick here, I just don't know which one (or even what it's called).
(Oracle version is 10g)