Skip to Main Content

SQL & PL/SQL

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!

suppress heading for printing bind variable in sqlplus

user447000Nov 2 2007 — edited Nov 2 2007
Hi,
I have to spool a lot of (XML) text from within a sqlplus session to a file (unfortunately I can
not use UTL_FILE).
Because I found no way to pull out the complete XML string at once with sqlplus
I wrote a function which returns a CLOB value. Inside sqlplus I declare a variable and
assign the return value of the function to this variable. Then I do a "print my_varaible" in
sqlplus.
However I can suppress to undeline-line with "SET UNDERLINE OFF" but found
no way to suppress the heading for the "print" command. Here comes the snippet:

EXEC :my_variable := xmlprint
/* here I'm searching for a cool command */
print my_variable

Result is:
snip
MY_VARIABLE

<myxml>...</myxml>
snip
but I want only
<myxml>...</myxml>

BTW, how large can a sqlplus binding variable grow ?
Because I declared it as CLOB I assume it can grow to 4 GB ?!

see Oracle 9.2 documentation:
...CLOBs can store up to 4 gigabytes of character data. ...

Best regards,
Thomas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2007
Added on Nov 2 2007
7 comments
1,879 views