Question
Assignment 4-7: Handling Exceptions with User-Defined Errors Sometimes Brewbeans customers mistakenly leave an item out of a basket thats already been checked out, so they
Assignment 4-7: Handling Exceptions with User-Defined Errors 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.
This is assignment04-07;
BEGIN UPDATE bb_basketitem SET idBasket = ?? WHERE idBasket = ??; END;
This is the table list if needed.
4Connections x| Reports x Connections XE_pbok Tables (Filtered) B B- B- i BB-AUDIT-LOGON BB-BASKET BB-BASKETTEM BB_BASKETSTATUS BB BLOCKTEST i E-E B- BB-PRODUCT-REQUEST B- BB-PRODUCTOPTION B- BB-PRODUCTOPTIONCATEGORY . BB-PROD-SALES BB-PRODUCT | | : BB-PRODUCTOPTIONDETAIL I - BB-PROMO | B- BB-SHIPPING BB-SHOP-SALES B-E BBSHOPPER | - BB TEST2 BB TRANS LOG
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started