Question: Using MySQL... Set echo on SET SERVEROUT ON Set up a spool file to receive your output for submission. I would suggest c:CS4210wa6spool.txt DECLARE a

Using MySQL...

Set echo on

SET SERVEROUT ON

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

DECLARE a record variable, a variable to keep track of a change in Department_ID, and two accumulators

Add procedures to the DECLARE block to print a Head of Form, subtotals, and a grand total

In the BEGIN block add a select statement to read all employee records from HR.EMPLOYEES where DEPARTMENT_ID < 50, and a LOOP

Add DBMS_OUTPUT.PUT lines to build up the output line one field at a time

Add a DBMS_OUTPUT.NEW_LINE at the end to print the finished line

After the LOOP be sure to print the final subtotal and the grand total

Add a EXCEPTION block to report when no data is found

Compile and run the procedure

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!