Question

Oracle 11g PL/SQL Programming Sometimes Brewbean’s customers mistakenly leave an item out of a basket that’s...

Oracle 11g PL/SQL Programming 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.

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

0 0
Add a comment Improve this question Transcribed image text
Answer #1

e veut hamaless in the crme . befele ol rffet CGREATE ALTER, DRop et on B BASKETITEM fel each low geaiu 休1 end if end

Add a comment
Know the answer?
Add Answer to:
Oracle 11g PL/SQL Programming Sometimes Brewbean’s customers mistakenly leave an item out of a basket that’s...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • oracle 11g 2nd edition pl/sql Assignment 5-10: Returning a Record Create a procedure named DDPROJ_SP that...

    oracle 11g 2nd edition pl/sql Assignment 5-10: Returning a Record Create a procedure named DDPROJ_SP that retrieves project information for a specific project based on a project ID. The procedure should have two parameters: one to accept a project ID value and another to return all data for the specified project. Use a record variable to have the procedure return all database column values for the selected project. Test the procedure with an anonymous block.

  • PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create...

    PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create the schema, and package. 2. Create users x1 and x2 who are the participants in the auction. They will need acces to the package. 3. Bid on the same item and record your observations. Verify all scenarios. Upload the files with the missing code and a detailed sample run. AUCTION OWNER.TXT SQL> conn / as sysdba Connected. SQL> drop user xyz cascade; User dropped....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT