Question: Database Programming (Oracle) ***I would need the spool file from executing the following commands: Following the example in the Lecture, print a PIVOT report of
Database Programming (Oracle)
***I would need the spool file from executing the following commands:
Following the example in the Lecture, print a PIVOT report of salaries for HR.EMPLOYEES.
Set echo on
SET SERVEROUT ON
Set up a spool file to receive your output for submission. I would suggest c:\cs423\wa1spool.txt
Add the following procedure to the DECLARE section: PROCEDURE Var2Currency(v_col IN NUMBER) IS BEGIN DBMS_OUTPUT.PUT(TO_CHAR(NVL(v_col,0), '999,999,999')); END; The null values in this dataset will kill you if you don't change them into zeros
Print the column headings for Dept, UK, USA, Germany, and Canada
Create a SELECT statement that will display salaries for each Department by Country. Notice that Country_ID has the values 'UK', 'US', 'DE', and 'CA'. You will need those single quotes in your IN statement
Compile and run your report
Close the spool file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
