Question: Print a single formatted record 1. Set echo on 2. Set up a spool file to receive your output for submission. I would suggest c:cs4210WA4spool.txt

Print a single formatted record

1. Set echo on

2. Set up a spool file to receive your output for submission. I would suggest c:\cs4210\WA4spool.txt .

3. SET SERVEROUTPUT ON

4. DECLARE a record variable (Emp_rec) using %ROWTYPE

5. In the BEGIN block use INTO to load a record into the declared variables for HR.EMPLOYEES for Employee_ID = 114

6. Use a CASE statement to print the associated Department Name for Department_ID

7. Add DBMS_OUTPUT lines to print each variable for the selected record

8. Use TO_CHAR to format Salary as 999,999.00

9. Add an EXCEPTION block to report when no data is found

10. Compile and run the procedure

11. Close the spool file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!