I can successfully spool query results to a text file. I want each column to be a fixed length (as shown below) and the fields CANNOT be separated by any spaces. I've tried many suggestions, but I can't get rid of the extra padding. Thanks.
Code:
SET ECHO OFF
SET HEADING OFF
SET PAGESIZE 0
SET NEWPAGE 0
SET TRIMSPOOL ON
SET SPACE 0
SET LINESIZE 115
SET FEEDBACK OFF
SET TERMOUT OFF
SPOOL c:/spooltest.txt
COLUMN PR_NUMBER_TX FORMAT A9
COLUMN LINE_ITEM FORMAT A2
COLUMN RECORD_SEQ FORMAT A2
COLUMN PR_CORP_CODE_TX FORMAT A5
COLUMN PR_DATE_DT FORMAT A6
SELECT pr.pr_number_tx,
' 0' line_item,
' 0' record_seq,
pr.pr_corp_code_tx,
pr.pr_date_dt
FROM purchase_requisition pr
ORDER
BY pr.pr_number_tx;
SPOOL OFF
EXIT