Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write this in PL/SQL so either one will work. Problems: 1. (PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours, and the

Write this in PL/SQL so either one will work.

image text in transcribedimage text in transcribedimage text in transcribed

Problems: 1. (PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours, and the table PAYINFO with attributes Regular, Overtime, and Cutoff, defined and populated by the following script DROP TABLE EMPLOYEE CASCADE CONSTRAINTS CREATE TABLE EMPLOYEE ID Name Hours CHAR (9), VARCHAR2 (12) NUMBER (3), CONSTRAINT PK EMPLOYEE PRIMARY KEY (ID) INSERT INTO EMPLOYEE VALUES '717222144', 'Dolenz, 30); INSERT INTO EMPLOYEE VALUES '013331902", 'Jones', 50); INSERT INTO EMPLOYEE VALUES ('591342771', 'Nesmith', 65); INSERT INTO EMPLOYEE VALUES (' 822182889*, 'Tork, 25); SELECT * FROM EMPLOYEE DROP TABLE PAYINFO; CREATE TABLE PAYINFO Regular Overtime Cutoff NUMBER (4,2), NUMBER (4,2), NUMBER (2) INSERT INTO PAYINFO VALUES (15.00, 18.50, 40); SELECTFROM PAYINFO; COMMIT Write a script file Problem1.sql containing an anonymous PL/SQL block that will do the followin First, report three values found in the PAYINFO table and store them in variables. (You may assume that the PAYINFO table contains only one record.) Next, output the ID and Name of each employee in the EMPLOYEE table and their total pay, computed as Regular* Hours (Regular* Cutoff) +(Overtime * (Hours - Cutoff)) if Hours Cutoff (In other words, each employee is paid at the regular hourly rate for hours up to the cutoff value, and is paid at the higher overtime rate for any hours beyond the cutoff value.) Output each Problems: 1. (PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours, and the table PAYINFO with attributes Regular, Overtime, and Cutoff, defined and populated by the following script DROP TABLE EMPLOYEE CASCADE CONSTRAINTS CREATE TABLE EMPLOYEE ID Name Hours CHAR (9), VARCHAR2 (12) NUMBER (3), CONSTRAINT PK EMPLOYEE PRIMARY KEY (ID) INSERT INTO EMPLOYEE VALUES '717222144', 'Dolenz, 30); INSERT INTO EMPLOYEE VALUES '013331902", 'Jones', 50); INSERT INTO EMPLOYEE VALUES ('591342771', 'Nesmith', 65); INSERT INTO EMPLOYEE VALUES (' 822182889*, 'Tork, 25); SELECT * FROM EMPLOYEE DROP TABLE PAYINFO; CREATE TABLE PAYINFO Regular Overtime Cutoff NUMBER (4,2), NUMBER (4,2), NUMBER (2) INSERT INTO PAYINFO VALUES (15.00, 18.50, 40); SELECTFROM PAYINFO; COMMIT Write a script file Problem1.sql containing an anonymous PL/SQL block that will do the followin First, report three values found in the PAYINFO table and store them in variables. (You may assume that the PAYINFO table contains only one record.) Next, output the ID and Name of each employee in the EMPLOYEE table and their total pay, computed as Regular* Hours (Regular* Cutoff) +(Overtime * (Hours - Cutoff)) if Hours Cutoff (In other words, each employee is paid at the regular hourly rate for hours up to the cutoff value, and is paid at the higher overtime rate for any hours beyond the cutoff value.) Output each

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

=+3 In what ways can an MNE improve or change its approach to IHRM?

Answered: 1 week ago