Answered step by step
Verified Expert Solution
Question
1 Approved Answer
oracle 19c Create a trigger named Check_Availability. The trigger raises an application error when a product is out of stock or not enough to fulfil
oracle 19c
Create a trigger named Check_Availability. The trigger raises an application error when a product is out of stock or not enough to fulfil an order. It should display a message on the estimated date when the product will be available (use expected delivery date). Include the following test statement in your script file: Insert Into order_lines values (388,1023,100,20,2,160); Iselect from order lines; select * from jobs; select * from employees; TOTAL_AMOUNT Script Output x Query Result x 3 dB SQL | Fetched 50 rows in 0.057 seconds ORDER_ID PRODUCT_ID ACTUAL_PRICE DISCOUNT QUANTITY 1 508 1278 8927.57 26 1 1278 1159 4621.11 63 1320 1192 19037 17 18 6606.4 6 10258.86 UN 284412.78 1320 1235 19624.49 30 23 315954.29 on N 1320 1141 482.29 73 2083.49 16 6 1221 1923 509.08 17 1 422.54 20 7 1923 1244 509.08 54 4683.54 1147 56 24 8 1874 1281.39 13531.48 17 3209.39 12 48012.47 9 2001 1143 29 22 10 20859.66 325827.89 2468 1231 77 11 1031 18698.26 17 73110.2 3566 55 2 12 20472.69 18425.42 3571 1209 48 13 13 3571 1120 11858.97 2437.21 9 40 14 3576 1240 80166.64 13160.93 75299.42 86987.82 5 15 3576 15852.51 1167 3 11 16 3677 1188 8152.56 PCT F All Rows Fetched: 11 in 0.261 seconds TABLE_NAME TABLESPACE_NAME CLUSTER_NAME IOT_NAME STATUS 1 JOBS USERS (null) (null) VALID 2 DEPARTMENTS USERS (null) (null) VALID 3 EMPLOYEES USERS (null) (null) VALID 4 CUSTOMERS USERS (null) (null) VALID 5 SHIPMENT METHOD USERS (null) (null) VALID 6 PAYMENT METHOD USERS (null) (null) VALID 7 ORDERS USERS (null) (null) VALID 8 CATEGORIES USERS (null) (null) VALID 9 PRODUCTS USERS (null) (null) VALID 10 PRODUCT INVENTORY USERS (null) (null) VALID 11 ORDER LINES USERS (null) (null) VALID 1 1 Messages - Log Create a trigger named Check_Availability. The trigger raises an application error when a product is out of stock or not enough to fulfil an order. It should display a message on the estimated date when the product will be available (use expected delivery date). Include the following test statement in your script file: Insert Into order_lines values (388,1023,100,20,2,160); Iselect from order lines; select * from jobs; select * from employees; TOTAL_AMOUNT Script Output x Query Result x 3 dB SQL | Fetched 50 rows in 0.057 seconds ORDER_ID PRODUCT_ID ACTUAL_PRICE DISCOUNT QUANTITY 1 508 1278 8927.57 26 1 1278 1159 4621.11 63 1320 1192 19037 17 18 6606.4 6 10258.86 UN 284412.78 1320 1235 19624.49 30 23 315954.29 on N 1320 1141 482.29 73 2083.49 16 6 1221 1923 509.08 17 1 422.54 20 7 1923 1244 509.08 54 4683.54 1147 56 24 8 1874 1281.39 13531.48 17 3209.39 12 48012.47 9 2001 1143 29 22 10 20859.66 325827.89 2468 1231 77 11 1031 18698.26 17 73110.2 3566 55 2 12 20472.69 18425.42 3571 1209 48 13 13 3571 1120 11858.97 2437.21 9 40 14 3576 1240 80166.64 13160.93 75299.42 86987.82 5 15 3576 15852.51 1167 3 11 16 3677 1188 8152.56 PCT F All Rows Fetched: 11 in 0.261 seconds TABLE_NAME TABLESPACE_NAME CLUSTER_NAME IOT_NAME STATUS 1 JOBS USERS (null) (null) VALID 2 DEPARTMENTS USERS (null) (null) VALID 3 EMPLOYEES USERS (null) (null) VALID 4 CUSTOMERS USERS (null) (null) VALID 5 SHIPMENT METHOD USERS (null) (null) VALID 6 PAYMENT METHOD USERS (null) (null) VALID 7 ORDERS USERS (null) (null) VALID 8 CATEGORIES USERS (null) (null) VALID 9 PRODUCTS USERS (null) (null) VALID 10 PRODUCT INVENTORY USERS (null) (null) VALID 11 ORDER LINES USERS (null) (null) VALID 1 1 Messages - 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