Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: [Q] Reading clobs via sqlplus and trimming
Stefan.Leppert_at_gmx.net (Stefan Leppert) writes:
> 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, sqlplus-
> reference,...) 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_');
>
> Result:
> x
> y
> _z
Nothing non-hacky springs to mind. (Hacky solution is to pre-process, replacing spaces with a token, and post processing to reconvert the token.)
Out of interest, why are the trailing spaces important to you?
Chris
-- Christopher Jones, Oracle Corporation, Australia.Received on Mon Dec 09 2002 - 18:05:35 CST
![]() |
![]() |