Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> [Q] Reading clobs via sqlplus and trimming
Hi!
I try to retrieve a clob via sqlplus to process it in a shell script. The problem I encountered (and couldn't answer via google, sqlplusreference,...) is, that sqlplus removes trailing spaces even *inside* the clob. If i switch trimming off I get too many blanks (filled up to linesize) otherwise too few! :(
Sample (Underscores=Spaces for readability):
sql> create table tbl (col1 clob);
sql> insert into tbl values('x_
y_
_z_');
SHELL> sqlplus -s <LOGIN>/<PWD> << EOF
set verify off
set pagesize 0
set heading off
set feedback off
set recsep off
set colsep ""
set wrap on
set truncate off
set lin 4000
select * from tbl;
exit
EOF
Result:
x
y
_z
Is there a way to do it or do I have to abandon sqlplus for this??
Thanks in advance,
Stefan Received on Mon Dec 09 2002 - 12:29:30 CST