Calculate annual raises for all employees

Assignment Help PL-SQL Programming
Reference no: EM131371805

1. Using implicit cursor

The BB_SHOPPER table in the Brewbean's database contains a column named PROMO that specifies promotions to send to shoppers. This column needs to be cleared after the promotion has been sent. First, open the assignment04-03.txt file in the Chapter04 folder in a text editor (such as Notepad). Run the UPDATE and COMMIT statements at the top of this file (not the anonymous block at the end). Modify the anonymous block so that it displays the number of rows updated onscreen. Run the block.

2. Handling Exceptions with User-Defined Errors
Sometimes Brewbean's customers mistakenly leave an item out of a basket that's already been checked out, so they create a new basket containing the missing items. However, they request that the baskets be combined so that they aren't charged extra shipping. An application page has been developed that enables employees to change the basket ID of items in the BB_BASKETITEM table to another existing basket's ID to combine the baskets. A block has been constructed to support this page (see the assignment04-07.sql file in the Chapter04 folder). However, an exception handler needs to be added to trap the situation of an invalid basket ID being entered for the original basket. In this case, the UPDATE affects no rows but doesn't raise an Oracle error. The handler should display the message "Invalid original basket ID" onscreen. Use an initialized variable named lv_old_num with a value of 30 and another named lv_new_num with a value of 4 to provide values to the block. First, verify that no item rows with the basket ID 30 exist in the BB_BASKETITEM table.

3. Assignment 4-8: Processing and Updating a Group of Rows

To help track employee information, a new EMPLOYEE table was added to the Brewbean's database. Review the data in this table. A PL/SQL block is needed to calculate annual raises and update employee salary amounts in the table. Create a block that addresses all the requirements in the following list. All salaries in the EMPLOYEE table are recorded as monthly amounts. Tip: Display the calculated salaries for verification before including the update action.

- Calculate 6% annual raises for all employees except the president.

- If a 6% raise totals more than $2,000, cap the raise at $2,000.

- Update the salary for each employee in the table.

- For each employee number, display the current annual salary, raise, and proposed new annual salary.

- Finally, following the details for each employee, show the total cost of all employees' salary increases for Brewbean's.

Attachment:- Assignment - SQL.rar

Reference no: EM131371805

Questions Cloud

Design a plc program and prepare a typical i/o connection di : Suppose your accumulated value is 24 and you lose ac line power to the controller. When power is restored to your controller, what will your accumulated value be?
Identify life events that might motivate an individual : Identify life events that might motivate an individual to seek wellness services.Develop a mission statement for the clinic. Provide an overview of services offered. Describe an itinerary for two days of treatment.Explain how assessments will..
How much time will it take a car travelling : How much time will it take a car travelling at 88 km/hr (55 mi/hr) to travel 500km? Show work for credit and include final units.
Determine three ways that employee layoffs can affect : Determine three ways that employee layoffs can affect other employees in the organization. Examine two additional ways that employee layoffs can affect the organization as a whole.
Calculate annual raises for all employees : Calculate annual raises for all employees except the president - Handling Exceptions with User-Defined Errors - Modify the anonymous block so that it displays the number of rows updated onscreen. Run the block.
Describe the level of enjoyment the experience afforded : Explain what subjects, themes, and stylistic characteristics enhanced your appreciation of art. Describe the level of enjoyment the experience afforded. Share one or two details about your emotional response.
Child speed halfway down : A31.1-kg child starting from rest slides down a water slide with a vertical height of12.0m. (Neglect friction.) (a) What is the child's speed halfway down the slide's vertical distance?
Understand the history and impact of health insurance : Understand the history and impact of health insurance on health care reimbursement process and recognize various types of health insurance coverage.
Define statistics with citation and reference : Define statistics with citation and reference. Contrast quantitative data and qualitative data. Use two Peer Reviewed references. Evaluate tables and charts used to represent quantitative and qualitative data.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Write a select statement that returns these columns

Write a SELECT statement that returns these columns from the Products table: The date_added column A column that uses the CAST function to return the date_added column with its date only (year, month, and day)

  Security administrator for a small company

You are the security administrator for a small company. You have a single server that is used as your Web server and e-commerce server. It is in your office, separate and distinct from all other systems.

  Write a sql query that returns the names of the students

Write a SQL query that returns the names of the students (lname, fname), and the major of the major with most students. If more than one major is tied for most students, then list all the names of the students from both majors (as well as the major..

  Write the code for the triggers

Write the code for the following triggers following the style shown in the text. a. When adding a customer, add the customer's balance times the sales rep's commission rate to the commission for the corresponding sales rep.

  Initial radioisotope power supply

A satellite has an initial radioisotope power supply of 70 watts (W). The power output in watts is given by P = 70e-t/250 where t is the time in days. Solve for t to find the time when the power supply is 60 W. (Round your answer to the nearest da..

  Sql statements needed to demonstrate the triggers

Upload your triggers and procedures here, along with the commented SQL statements needed to demonstrate that the triggers and procedures work as advertised.

  Write sql statement-display major of student-no duplications

Write a SQL statement to display the Major of the student with no duplications. Write a SQL statement to display the First and Last name of students who live in the Zip code 88888.

  Write the sql select statement to display the average rent

Write the SQL SELECT statement to display the average rent of the properties. Write the SQL SELECT statement to display the property type, rooms, and rent sorted by the Type.

  Use the data modeler tool to map your entity relationship

Comment on any changes you made to the Relational diagram before mapping the final DDL script. Discuss why you had to make these changes (1 page maximum).

  Describe and explain oracle date and time format in details

Describe and explain Oracle Date and Time Format in details. Provide some Functions used for Date and Time and give some syntax example of their usage. Expand your examples to include some Arithmetic used with Oracle Date.

  Grouping data-summarizing grouped data

After reviewing and completing the Unit 1 Guided Practice 2, I suggest that you review all tables using the Object Browser area of the SQL Workshop associated with the scenarios below, as well as field data types and data (case sensitivity) before..

  Write a sql statement to return some columns

Prepare this SQL query and sort the result set by CategoryName and then by ProductName in ascending order- Write a SQL statement to return some columns

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd