If you want to add data from a database into a spooled file via SQL, then you should consider these options: