Toad World® Forums

Bug in spool

Hi,

Toad 12.7.0.48 x64

SQL:
select
‘PROMPT ’ ||index_name ||’-’ || partition_name || chr(10)|| ‘ALTER INDEX ’ || user || ‘.’ || index_name || ’ REBUILD PARTITION ’ || partition_name || ’ PARALLEL 4 PCTFREE 0;’ sql_string
from user_ind_partitions
where 1=1
and
status = ‘UNUSABLE’
order by index_name, partition_position
;

when you run as SQL ok.

when you run as script (F5) you get two rows for one record:

SQL_STRING

PROMPT TBL_XXX_4IX-TBL_XXX_102049459
ALTER INDEX USERXXX.TBL_XXX_4IX REBUILD PARTITION TBL_XXX_102049459 PARALLEL 4 PCTFREE 0;
ALTER INDEX USERXXX.TBL_XXX_4IX REBUILD PARTITION TBL_XXX_102049459 PARALLEL 4 PCTFREE 0;
PROMPT TBL_XXX_4IX-TBL_XXX_102101134
ALTER INDEX USERXXX.TBL_XXX_4IX REBUILD PARTITION TBL_XXX_102101134 PARALLEL 4 PCTFREE 0;
ALTER INDEX USERXXX.TBL_XXX_4IX REBUILD PARTITION TBL_XXX_102101134 PARALLEL 4 PCTFREE 0;
PROMPT TBL_XXX_4IX-TBL_XXX_102156284
ALTER INDEX USERXXX.TBL_XXX_4IX REBUILD PARTITION TBL_XXX_102156284 PARALLEL 4 PCTFREE 0;
ALTER INDEX USERXXX.TBL_XXX_4IX REBUILD PARTITION TBL_XXX_102156284 PARALLEL 4 PCTFREE 0;

Seems that chr(10) in sql is making problems when spooling data…
Brg
Damir

Hi Damir - we have an open CR for the chr(10) issue - I’ve added your example to it for reference. Thanks.

Hi Damir,

Is this still an issue for you with the current beta?

Hi

I confirm that in 12.7.0.76 issue is solved.

Brg

Damir