Hello all,
I have written the following code to generate a fixed length flat file but it puts spaces at the end of each record that is outputted onto the flat file:
SET FEEDBACK off
SET HEADING off
SET PAGESIZE 0
SET LINESIZE 200
SET TERM off
SET VERIFY off
SPOOL C:\ohco\filessenttorust\PolicyInfo.txt
select rpad(companycode||''||policynumber||''||secondarycompanycode, 12)||
rpad(to_char(futureadjustmentamount,'999.99'),7)||
rpad(to_char(datefutureadjustmentmade,'yyyymmdd'),8)||
rpad(to_char(trunc(sysdate),'yyyymmdd'),8)
from ohco.policyrecord
where datefutureadjustmentmade is not null
and futureadjustmentamount is not null
and datefutureadjustmentmade between trunc(next_day(sysdate-7,'SATURDAY')) and trunc(sysdate);
SPOOL off
SET PAGESIZE 14
SET TERM on
SET VERIFY on
SET FEEDBACK on
SET HEADING on
exit
How do I get rid of the spaces at the end of each record on the file.
Any help will be appreciated.
Thanks.
I have written the following code to generate a fixed length flat file but it puts spaces at the end of each record that is outputted onto the flat file:
SET FEEDBACK off
SET HEADING off
SET PAGESIZE 0
SET LINESIZE 200
SET TERM off
SET VERIFY off
SPOOL C:\ohco\filessenttorust\PolicyInfo.txt
select rpad(companycode||''||policynumber||''||secondarycompanycode, 12)||
rpad(to_char(futureadjustmentamount,'999.99'),7)||
rpad(to_char(datefutureadjustmentmade,'yyyymmdd'),8)||
rpad(to_char(trunc(sysdate),'yyyymmdd'),8)
from ohco.policyrecord
where datefutureadjustmentmade is not null
and futureadjustmentamount is not null
and datefutureadjustmentmade between trunc(next_day(sysdate-7,'SATURDAY')) and trunc(sysdate);
SPOOL off
SET PAGESIZE 14
SET TERM on
SET VERIFY on
SET FEEDBACK on
SET HEADING on
exit
How do I get rid of the spaces at the end of each record on the file.
Any help will be appreciated.
Thanks.