Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

don't have table structure for 1st question pls help in which way u like to do.. it is important for me to submit the assignment

don't have table structure for 1st question pls help in which way u like to do.. it is important for me to submit the assignment to pass the course. Assignment 2 Question 1 Identifying Customers Brewbeans Coffee Company wants to offer an incentive of free shipping to customers who havent returned to the site since a specified date. Create a procedure named PROMO_SHIP_SP that determines who these customers are and then updates the BB_PROMOLIST table accordingly. The procedure uses the following information: Date cutoffAny customers who havent shopped on the site since this date should be included as incentive participants. Use the basket creation date to reflect shopper activity dates. MonthA three-character month (such as APR) should be added to the promotion table to indicate which month free shipping is effective. YearA four-digit year indicates the year the promotion is effective. promo_flag1 represents free shipping. The BB_PROMOLIST table also has a USED column, which contains the default value N and is updated to Y when the shopper uses the promotion. Test the procedure with the cutoff date 15-FEB-12. Assign free shipping for the month APR and the year 2012. Question 2. Define a cursor to display employees last name and employee number along with their managers last name and manager number. Use Self Join techniques to write this SELECT statement Loop this cursor and fetch it While you are fetching each record, Check each record and do below updates. -IF employees manager id is 102 then update employee table to change commission_pct column to 0.5 -IF employees manager id is 103 then update employee table to change commission_pct column to 0.7 -IF employees manager id is 124 then update employee table to change commission_pct column to 0.9 -For Everybody else then update employee table to change commission_pct column to 0.8 Close the cursor and end the program Test your code Once you execute your code make sure all updates went OK and Execute SELECT * FROM Employees to show me latest commission_pct Give me screen shot of Employees table records after your PL/SQL code run

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_2

Step: 3

blur-text-image_3

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

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

Explain the metrics for evaluating training and development.

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago