Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Set echo on 2. SET SERVEROUT ON 3. Set up a spool file to receive your output for submission. I would suggest c:CS4210wa5spool.txt .

1. Set echo on

2. SET SERVEROUT ON

3. Set up a spool file to receive your output for submission. I would suggest c:\CS4210\wa5spool.txt .

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

5. In the BEGIN block add a select statement to read a record into the declared variable from HR.EMPLOYEES

6. for all employees WHERE DEPARTMENT_ID = 30

7. Add a LOOP to print all the records

8. Add DBMS_OUTPUT lines to print EMPLOYEE_ID, FIRST_NAME, LAST_NAME, and SALARY for the selected record

9. Use TO_CHAR to format the salary as $999,999

10. Add a EXCEPTION block to report when no data is found

11. Compile and run the procedure.

12. Close the spool file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago