Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Truncation of result XML using Select xmlelement

240130Dec 12 2002 — edited Jan 9 2003
I am trying the new XMLELEMENT Function of Select, and the resulting XML is truncating. It appears that only very short XML strings return properly. All others truncate.

Example:
Table Token
Token_Id Number;
Token_load_id Varchar2(64);
Table Batch
Batch_Id Number;

select xmlelement("Batch", xmlelement("BatchId" , b.batch_Id),
xmlelement("Card", xmlelement("TokenId" , t.token_Id),
xmlelement("TokenLoadId", substr(t.token_load_Id,1,20)))) as "XMLResult"
from token t, token_batch b
where t.batch_id = b.batch_id
and token_id < 110;

Result:


XMLResult
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<Batch>
<BatchId>1</BatchId>
<Card>
<TokenId>100</TokenId>
<TokenLoa

<Batch>
<BatchId>1</BatchId>
<Card>
<TokenId>101</TokenId>
<TokenLoa
.
.
.
So why would the result truncate? I built the above query based on examples in the CD doc set.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2003
Added on Dec 12 2002
3 comments
509 views