Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Oracle 11g PL/SQL Programming Sometimes Brewbeans customers mistakenly leave an item out of a basket thats already been checked out, so they create a new

Oracle 11g PL/SQL Programming Sometimes Brewbeans customers mistakenly leave an item out of a basket thats 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 arent 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 baskets ID to combine the baskets. A block has been constructed to support this page (see the assignment0407.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 doesnt 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.

BEGIN UPDATE bb_basketitem SET idBasket = ?? WHERE idBasket = ??; END;

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

Students also viewed these Databases questions