SQL Plus Spool - I can't get rid of a trailing blank line in the output file
Hi, I need to create a text file that is fixed format of 131 characters. I am not able to find a way to remove the 1 trailing blank line at the end of the output file. This is what I have now. I have tried several other set commands in various combinations, but still get the trailing blank line.
set heading off
set feedback off
set verify off
set trimspool off
set term off
set colsep ''
set space 0
set pagesize 0
set linesize 131
select LPAD(' ',24) as FILLER1, RPAD(LK.MAP_PAGE,4) as MAPIDFROMSERVICE, LPAD(' ',35) as FILLER2,
LPAD(C.SIT_ID,9,'0') as SITEID, LPAD(C.IS_SEQ_NUM,9,'0') as INSTSERV, LPAD(' ',50) as FILLER3
from GIS_C_lOCATION@ORAC2Rdv.world C
join ELECTRIC.SERVICE_TB S on C.SIT_ID_ISS_SEQ_NUM = S.CUSTOMER_ACCOUNT_NO
join electric.electric_service_point_tb e on s.electric_service_point_id = e.id
join ops$enom.SERVICE_POINT_MAP_PAGE lk on lk.elec_service_point_id = s.electric_service_point_id,
where SDO_RELATE(e.location , st.extent, 'mask=anyinteract querytype=WINDOW' ) = 'TRUE'
and trim(LK.MAP_PAGE) != trim(c.psnh_map_num)
The output file is attached.
Any help would be greatfully appreciated.