Chapter 10B – Managing Databases with Oracle Database
DBMS_OUTPUT.PUT_LINE
(‘ The SHIPPER Shipper ID that you have entered exists.’);
DBMS_OUTPUT.PUT_LINE (‘ ‘);
DBMS_OUTPUT.PUT_LINE
(‘ SHIPPER ShipperID = ‘|| NewShipperID);
DBMS_OUTPUT.PUT_LINE
DBMS_OUTPUT.PUT_LINE
(‘ The SHIPMENT_ITEM is already assigned to a SHIPMENT.’);
DBMS_OUTPUT.PUT_LINE (‘ ‘);
DBMS_OUTPUT.PUT_LINE
(‘ SHIPMENT ShipmentID = ‘|| AssignedShipmentNumber);
DBMS_OUTPUT.PUT_LINE (‘ ‘);
DBMS_OUTPUT.PUT_LINE
IF NumberOfShipmentRows = 0 THEN
/* Create the SHIPMENT */
INSERT INTO SHIPMENT
(ShipmentID, ShipperID, PurchasingAgentID, ShipperInvoiceNumber,
Origin, Destination, ScheduledDepartureDate)
VALUES(
NewShipmentID, NewShipperID, NewPurchasingAgentID,
NewShipperInvoiceNumber, NewOrigin, NewDestination,
NewDepartureDate);