Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Print a single formatted record 1- Set echo on 2- Set up a spool file to receive your output . 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 . I would suggest c:\cs4210\WA4spool.txt .

3- SET SERVEROUTPUT ON

5- DECLARE a record variable (Emp_rec) using %ROWTYPE

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

7- Use a CASE statement to print the associated Department Name for Department_ID

8- Add DBMS_OUTPUT lines to print each variable for the selected record

9- Use TO_CHAR to format Salary as 999,999.00

10- Add an 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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions