How to remove trailing spaces in SQL PLUS spool
Hi,
I've requirement to pull data from tables and I'm using sqlplus spool to automate data fetch from various tables:
I'm using the following script for the same :
set echo off
set feedback off
set pagesize 0
set linesize 2000
set heading on
set trimspool on
Spool table1.TXT;
prompt col1|col2|col3|col4|col5
select
LTRIM(RTRIM(col1))||'|'||
LTRIM(RTRIM(col2)) ||'|'||
LTRIM(RTRIM(col3)) ||'|'||
LTRIM(RTRIM(col4)) ||'|'||
LTRIM(RTRIM(col5)) ||'|'||
from TABLE1 ;
spool off
After using trimspool on option also I'm having trailing spaces issue how to fix it?
Thanks,
Mahender.
Edited by: user518071 on Oct 11, 2010 1:05 PM