SPOOL TRIM COLUMN
469875Sep 27 2006 — edited Nov 13 2006HI ALL,
on my DIRECTORY table i have defined:
FNAME VARCHAR2(20)
LNAME VARCHAR2(20)
ADDRESS VARCHAR2(60)
i have a script to spool data into a CSV file.
-------------------------------------------------------------------------
SET COLSEP ','
SPOOL sample.csv
select FNAME, LNAME, ADDRESS
from DIRECTORY;
SPOOL OFF;
-------------------------------------------------------------------------
and iv got this result on my sample.csv file:
-------------------------------------------------------------------------
John<so many spaces> ,Smith<so many spaces> ,Mouse Drive<so many spaces>
Lance<so many spaces> ,Depuche<so many spaces> ,Cultu Avenue<so many spaces>
-------------------------------------------------------------------------
how can i trim all the columns to eliminate the spaces?
my spool file should have:
John,Smith,Mouse Drive
instead of:
John<so many spaces>,Smith<so many spaces>,Mouse Drive<so many spaces>
Thanks!
BROKEN