Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1- Set echo on 2- Set up a spool file to receive your output for submission. I would suggest c:cs4210WA2spool.txt 3- Use the COLUMN statement

1- Set echo on

2- Set up a spool file to receive your output for submission. I would suggest c:\cs4210\WA2spool.txt

3- Use the COLUMN statement to set the headings and formats for each column in HR.EMPLOYEES

4- Set appropriate linesize and pagesize. Give your report the title 'CS4210 Seminar 2 Written Assignment'

5- Set a break on DEPARTMENT_ID and REPORT

6- Compute subtotals on DEPARTMENT_ID and a grand total on REPORT

7- Show just the fields DEPARTMENT_ID, EMPLOYEE_ID, FIRST_NAME, LAST_NAME, and SALARY from HR.EMPLOYEES for Department_ID < 50 . (Don't forget to order by DEPARTMENT_ID.)

8- Close the spool file

I keep getting an error, what am I doing wrong? Here is my code:

SQL> SET ECHO ON SQL> SPOOL c:\App\WA2spool.txt SQL> START c:\App\WA2.txt SQL> COLUMN DEPARTMENT_ID FORMAT 99999 HEADING 'Department ID' SQL> COLUMN EMPLOYEE_ID FORMAT 99999 HEADING 'Employee ID' SQL> COLUMN FIRST_NAME HEADING 'First Name' SQL> COLUMN LAST_NAME HEADING 'Last Name' SQL> COLUMN SALARY FORMAT 9,999.99 HEADING 'Salary' SQL> SET LINESIZE 200 SQL> SET PAGESIZE 50 SQL> TTITLE LEFT 'CS4210 Seminar 2 Written Assignment' SQL> BREAK ON DEPARTMENT_ID SQL> COMPUTE SUM OF SALARY ON DEPARTMENT_ID SQL> COMPUTE SUM OF SALARY ON REPORT SQL> SELECT DEPARTMENT_ID, EMPLOYEE_ID, FIRST_NAME, LAST_NAME, SALARY 2 FROM HR.EMPOYEES 3 WHERE DEPARTMENT_ID < 50 4 ORDER BY DEPARTMENT_ID 5 / FROM HR.EMPOYEES * ERROR at line 2: ORA-00942: table or view does not exist

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

What is the principle of thermodynamics? Explain with examples

Answered: 1 week ago