SET TERMOUT OFF 
SET NEWPAGE 0 
SET SPACE 0 
set trimspool on
set linesize 288
SET PAGESIZE 0 
SET ECHO OFF 
SET FEEDBACK OFF 
set heading off
SPOOL  l:\reports\hosp10\Mac.CSV
select
'PROVIDER_NUMBER'
||','||'RPT_REC_NUM'
||','||'FYB'
||','||'FYE'
||','||'STATUS'
||','||'ADR_VNDR_CD'
||','||'FI_NUM'
from dual;
select 
rtrim(PRVDR_NUM)
||','||RPT_REC_NUM
||','||FY_BGN_DT
||','||FY_END_DT
||','||rtrim(RPT_STUS_CD)
||','||rtrim(ADR_VNDR_CD)
||','||rtrim(FI_NUM)
from hosp10.HOSP10_rpt_EXPY_tbl
where rpt_rec_num in (7065,
3560,
3657,
3315,
1255,
5153,
6520,
6854,
6855,
1571,
1229,
3167,
4319,
1404,
4559,
7071,
7157,
7134,
648,
7214,
6876,
7230)
order by prvdr_num ;
spool off