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\hospITAL10_PROVIDER_ID_INFO.csv
select
'PROVIDER_NUMBER'
||','||'FYB'
||','||'FYE'
||','||'STATUS'
||','||'CTRL_TYPE'
||','||'hosp_Name'
||','||'Street_Addr'
||','||'Po_Box'
||','||'City'
||','||'State'
||','||'Zip_Code'
||','||'County'
from dual;
select 
rtrim(PROVIDER_NUMBER)
||','||FY_BGN_DT
||','||FY_END_DT
||','||rtrim(RPT_STUS_CD)
||','||rtrim(PRVDR_CTRL_TYPE_CD)
||','||rtrim(hosp_Name)
||','||rtrim(Street_Addr)
||','||rtrim(Po_Box)
||','||rtrim(City)
||','||rtrim(State)
||','||rtrim(Zip_Code)
||','||rtrim(County)
from valhosp10.na_temp
order by provider_number ;
spool off