Toad World® Forums

sqlplus trimspool support


#1

Hi,

I have a simple spool to file script and am getting extra blank space at the end of each line. I read on the site that Toad does support the trimspool setting.

If I run the same script directly within SQLPlus it trims the whitespace from the end of the lines as expected. If run within toad it pads out to the length of the column definition.

Thanks!

Chris

set pagesize 0
set heading off
set linesize 500
set termout off
set trimspool on
set trimout on
set trim on
set trims on
set feedback off

spool C:\Dev_sql\P_MODELRUN.pkb; select trim(name) from tbl;
spool off;


#2

Chris,

What version of Toad are you using? That should have been fixed for 10.6.

Greg

On Oct 21, 2010, at 8:54 PM, “chris.rokusek_421”
wrote:

Message from: chris.rokusek_421

Hi,

I have a simple spool to file script and am getting extra blank space at the
end of each line. I read on the site that Toad does support the trimspool
setting.

If I run the same script directly within SQLPlus it trims the whitespace
from the end of the lines as expected. If run within toad it pads out to the
length of the column definition.

Thanks!

Chris

set pagesize 0
set heading off
set linesize 500
set termout off
set trimspool on
set trimout on
set trim on
set trims on
set feedback off

spool C:\Dev_sql\P_MODELRUN.pkb; select trim(name) from tbl;
spool off;

Historical Messages

Author: chris.rokusek_421
Date: Thu Oct 21 18:14:51 PDT 2010

Hi,

I have a simple spool to file script and am getting extra blank space at the
end of each line. I read on the site that Toad does support the trimspool
setting.

If I run the same script directly within SQLPlus it trims the whitespace
from the end of the lines as expected. If run within toad it pads out to the
length of the column definition.

Thanks!

Chris

set pagesize 0
set heading off
set linesize 500
set termout off
set trimspool on
set trimout on
set trim on
set trims on
set feedback off

spool C:\Dev_sql\P_MODELRUN.pkb; select trim(name) from tbl;
spool off;

__
_______________________________________


#3

Hi Greg,

I was using 10.5 so just upgraded and tried it out in 10.6.

If I spool a varchar2 field then then it is okay and trims to end.

But if spool a CLOB with embedded newlines (assume ‘name’ is a clob in the original), then the bug still exists and it pads each line out to linesize in this case.

I must say these whole modes inherited from SQLPlus could use a additional (yet simpler) mode that just outputs w/o respect to linesize or padding (ie pretend a clob is a txt file with newlines and arbitrary space at end of each line that should be preserved).

Do I need to enter this is a bug/enhancement request on the site somewhere then?

Thanks!!

Chris


#4

Oh boy. Clobs are going to be fun!! Feel free to log a ticket with support in
this. I’m pretty loaded up with code expert work but hopefully I can get it
fixed soon.

Greg

On Oct 22, 2010, at 1:00 PM, “chris.rokusek_421”
wrote:

Message from: chris.rokusek_421

Hi Greg,

I was using 10.5 so just upgraded and tried it out in 10.6.

If I spool a varchar2 field then then it is okay and trims to end.

But if spool a CLOB with embedded newlines (assume 'name' is a clob in the
original), then the bug still exists and it pads each line out to linesize
in this case.

I must say these whole modes inherited from SQLPlus could use a additional
(yet simpler) mode that just outputs w/o respect to linesize or padding (ie
pretend a clob is a txt file with newlines and arbitrary space at end of
each line that should be preserved).

Do I need to enter this is a bug/enhancement request on the site somewhere
then?

Thanks!!

Chris

Historical Messages

Author: chris.rokusek_421
Date: Fri Oct 22 10:21:04 PDT 2010

Hi Greg,

I was using 10.5 so just upgraded and tried it out in 10.6.

If I spool a varchar2 field then then it is okay and trims to end.

But if spool a CLOB with embedded newlines (assume 'name' is a clob in the
original), then the bug still exists and it pads each line out to linesize
in this case.

I must say these whole modes inherited from SQLPlus could use a additional
(yet simpler) mode that just outputs w/o respect to linesize or padding (ie
pretend a clob is a txt file with newlines and arbitrary space at end of
each line that should be preserved).

Do I need to enter this is a bug/enhancement request on the site somewhere
then?

Thanks!!

Chris

__

Author: GTDG
Date: Thu Oct 21 18:28:22 PDT 2010
Chris, What version of Toad are you using? That should have been fixed for
10.6. Greg On Oct 21, 2010, at 8:54 PM, "chris.rokusek_421" <
toadoracle@questmail.info > wrote: Message from: chris.rokusek_421 Hi, I
have a simple spool to file script and am getting extra blank space at the
end of each line. I read on the site that Toad does support the trimspool
setting. If I run the same script directly within SQLPlus it trims the
whitespace from the end of the lines as expected. If run within toad it pads
out to the length of the column definition. Thanks! Chris set pagesize 0 set
heading off set linesize 500 set termout off set trimspool on set trimout on
set trim on set trims on set feedback off spool C:\Dev_sql\P_MODELRUN.pkb;
select trim(name) from tbl; spool off;
_______________________________________ Historical Messages Author:
chris.rokusek_421 Date: Thu Oct 21 18:14:51 PDT 2010 Hi, I have a simple
spool to file script and am getting extra blank space at the end of each
line. I read on the site that Toad does support the trimspool setting. If I
run the same script directly within SQLPlus it trims the whitespace from the
end of the lines as expected. If run within toad it pads out to the length
of the column definition. Thanks! Chris set pagesize 0 set heading off set
linesize 500 set termout off set trimspool on set trimout on set trim on set
trims on set feedback off spool C:\Dev_sql\P_MODELRUN.pkb; select trim(name)
from tbl; spool off; __ _______________________________________
__

Author: chris.rokusek_421
Date: Thu Oct 21 18:14:51 PDT 2010

Hi,

I have a simple spool to file script and am getting extra blank space at the
end of each line. I read on the site that Toad does support the trimspool
setting.

If I run the same script directly within SQLPlus it trims the whitespace
from the end of the lines as expected. If run within toad it pads out to the
length of the column definition.

Thanks!

Chris

set pagesize 0
set heading off
set linesize 500
set termout off
set trimspool on
set trimout on
set trim on
set trims on
set feedback off

spool C:\Dev_sql\P_MODELRUN.pkb; select trim(name) from tbl;
spool off;

__
_______________________________________


#5

Great. Entered as 862206. Thanks,

Chris