clear scr prompt ========================================================= prompt ========================================================= prompt ===== Export employee Information by Salary =========== prompt ========== to Microsoft Excel Utility ================= prompt ========== promptexample4 ================ prompt ============ Version 2.0 ==================== prompt ========================================================= prompt ========================================================= prompt ========================================================= prompt Please enter the following information: -- Get the minimum salary ACCEPT MinSal NUMBER PROMPT "Min Salary :" -- Get the maximum salary ACCEPT MaxSal NUMBER PROMPT "Max Salary :" -- Begin SPOOLing output to file SPOOL c:\promptexample4.csv SET heading on feedback off pagesize 25 colsep ',' -- Select the required employee record SELECT TO_CHAR(empno, '009999') as "ID", INITCAP(ename) as "Full Name", TO_CHAR(hiredate, 'yyyy/mm/dd') as "Hire On", TO_CHAR ( MONTHS_BETWEEN ( SYSDATE, hiredate )/12, '999' ) as "Service Lenght", TO_CHAR(sal, '$9999.99') as "Salary" FROM emp WHERE sal BETWEEN &MinSal AND &MaxSal ORDER BY ename; -- End of SPOOLing and save to data file. SPOOL OFF