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

  Submit the table creation statements for the database model

submit the table creation statements for the database model. submit them all in a single script file.also submit a

  Model layer takes advantage of a sql server database

Creation of a Model Layer that takes advantage of a SQL Server Database with at least new two tables conforming to the Entity Framework or a NoSQL solution using MongoDb. Creation of a ViewModel layer that supports your Views and and a repository l..

  Complete the given queries using hr schema

Complete the following queries using HR Schema. Submit your answer in the form of a SQL text file to the Final Project Dropbox.

  Show a structured query language query

Show a Structured Query Language (SQL) query, and screenshot your results in a Microsoft Word document. For Part 2, provide explanations and screenshots documenting

  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

  Write an application for the events

Closing the application. Close your running application by clicking its close box.

  Create the sql queries

Create the queries listed below: (Just write the SQL command for each query), RIDER - POINT TOTALS BY RACE LEVEL LISTING, List the Rider's Name, RaceLevel as Race_Level and the total number of all points based on their placement. Make sure that you..

  Write sql statement to add new record to part table

Write SQL statement which creates the stored procedure which adds new record to the Part table, and returns value of newly created PartID PK value in out parameter.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Determine all letter and person that have value over 1000

Determine all Letter and Person that have value over 1000. Use sub query - Show results sorted by letter in ascending order and person in descending.

  The database design

Update the TOC to reflect the new section.Name the document CS251_ _Final.doc.Submit the document for grading.Submit your database file to the Submission Area.

  Explain the primary purpose of a primary key in a database

Describe a situation in which you have used a database recently and Explain the primary purpose of a primary key in a database.

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