SQL Oracle Database 11g question:
Following the example in Lecture 4
Set echo on
SET SERVEROUT ON
Set up a spool file to receive your output for submission. Iwould suggest c:cs422awa4spool.txt .
DECLARE a record variable (Emp_rec) using %ROWTYPE
In the BEGIN block add a select statement to read a record intothe declared variable from HR.EMPLOYEES for an Employee_ID to bedetermined at run time
Add DBMS_OUTPUT lines to print DEPARTMENT, EMPLOYEE_ID,FIRST_NAME, LAST_NAME, and SALARY for the selected record
Use a CASE statement to print the associated Department Name forDEPARTMENT_ID
Use TO_CHAR to format the salary as $999,999
Add a EXCEPTION block to report when no data is found
Compile and run the procedure for the Employee, 114
Close the spool file
Submit your spool output file (wa4spool.txt) to the forminside this folder.