Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 714467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:04:41+00:00 2026-05-14T05:04:41+00:00

I am running a query that returns XML data and spools to a file.

  • 0

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)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:04:41+00:00Added an answer on May 14, 2026 at 5:04 am

    This might help:

    The default width of datatype columns
    is the width of the column in the
    database. The column width of a LONG,
    CLOB, NCLOB or XMLType defaults to the
    value of SET LONGCHUNKSIZE or SET
    LONG, whichever is the smaller, so I
    set BOTH LONG and LONGCHUNKSIZE
    to 32K and it worked beautifully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a query to mysql that returns encrypted data. I'd like, if possible,
I have a long running query that returns a large data set. This query
I am running a query that returns records from the LEFT of the EXCEPT
I'm running an MySQL query that returns results based on location. However I have
Ok, here's a query that I am running right now on a table that
I am running a query that returns me a collection of date objects for
I am running an Oracle query. It seems to work except that it returns
I am running a SQL query that returns a table of results. I want
I am running a query that returns ~30,000 rows from a C# TableAdapter, and
I've created a complex search query in SQL 2008 that returns data sorted by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.