Creating data extract with variable length records

Version: 7.1.2.1362

I'm trying to create a file of variable length records using a Command Window. My script look like this

- - - - - -

set linesize 200
set trimspool on
column header_rec format a100
column data_rec format a100
column trailer_rec format a100

column rownum new_value rec_cnt noprint

-- header rec
select '....' header_rec from dual;

-- data rec
select rownum, data_rec
from ..
where ..

-- trailer rec
select 'TRAILER|' || '&rec_cnt' from dual;

- - - - - -

Here's what I notice
1) trimspool is not available to be set using PL/SQL Dev
2) The header_rec IS trimmed
3) The data records are NOT trimmed

Is this because I am selecting two columns in the data portion, even though one column is NOPRINT?

How can I get trimmed data records AND get the record count at the same time?
 
The SET TRIMSPOOL command and the NOPRINT option are not supported, so this will indeed not work. You will always get fixed length lines. You would have to use the SQL Window to obtain variable length output.
 
Back
Top