Create a procedure that returns the most recent order


Create a procedure that returns the most recent order information for aparticular basket. This procedure should determine the most recent stage entry from the BB_BASKETSTATUS table and return the data. An IF or CASE clause needs to be used to return the stage description rather than the IDSTAGE number, which means little to the shopper. The IDSTAGE column of the BB_BASKETSTATUS table identifies each stage as follows: 1 = Submitted and received; 2 = Confirmed, processed, sent to shipping; 3 = Shipped; 4 = Cancelled; 5 = Backordered. The procedure needs to accept a basket id number and return the most recent status description and the date that status was recorded. If no status is available for the basket id queried, return a message stating that no status is available. Use a VARCHAR2 host variable to hold the date value returned. Name the procedure STATUS_SP. Test the procedure twice using the basket id of 4 and then 6.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create a procedure that returns the most recent order
Reference No:- TGS0135891

Expected delivery within 24 Hours