Hi I am using a sql script to extract data in a file using a spool command. I am converting one column that is numeric to to_CHAR and it is adding an extra space at the end. I have used FM0000 as a format but not sure why the trailing space is added when I convert a number to character.
I am using following in the script
SET SPACE 0
SET LINESIZE 1000
SET TRIMSPOOL ON
--SET TRIMOUT ON
SET TERMOUT OFF
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SPOOL /u05/oracle/loadarea/Paragon/iib/data/rdrmst.dat
SELECT TO_CHAR(RDRMST_ODOMETER,'FM000000') FROM TABLE
Please let me know