I am really struggling with this in SQL. I keep getting errors. Would it be possible to also attach a spool file for this? I would like to see a spool file for this exercise. I'm very confused. Print a single formatted record Set echo on Set up a spool file. I would suggest c:\Folder\WA4spool.txt SET SERVEROUTPUT ON DECLARE a record variable (Emp_rec) using %ROWTYPE In the BEGIN block use INTO to load a record into the declared variables for HR.EMPLOYEES for Employee_ID = 114 Use a CASE statement to print the associated Department Name for Department_ID Add DBMS_OUTPUT lines to print each variable for the selected record Use TO_CHAR to format Salary as 999,999.00 Add an EXCEPTION block to report when no data is found Compile and run the procedure Close the spool file
I am really struggling with this in SQL. I keep getting errors. Would it be possible to also attach a spool file for this? I would like to see a spool file for this exercise. I'm very confused.
Print a single formatted record
Set echo on
Set up a spool file. I would suggest c:\Folder\WA4spool.txt
SET SERVEROUTPUT ON
DECLARE a record variable (Emp_rec) using %ROWTYPE
In the BEGIN block use INTO to load a record into the declared variables for HR.EMPLOYEES for Employee_ID = 114
Use a CASE statement to print the associated Department Name for Department_ID
Add DBMS_OUTPUT lines to print each variable for the selected record
Use TO_CHAR to format Salary as 999,999.00
Add an EXCEPTION block to report when no data is found
Compile and run the procedure
Close the spool file
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 5 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)