I need to charge the customer if he matches one pricing system or two or more pricing systems from CONCAT_REL table and then come up with the pricing system.
For e.g. Rahul wants an airway mode AND sending a box AND also needs acknowledgement, then he needs to be tagged to PRICE_SYSTEM1 AND PRICE_SYSTEM3
If Rajkumar wants an rail_road mode AND sending a container that needs to delivered to a house AND delivery_ph is not to call, then he needs to be tagged to PRICE_SYSTEM1
If Ashok is sending a fragile item that needs to delivered to a house AND the delivery_ph is text OR delivery_type is office, then he needs to be tagged to PRICE_SYSTEM2
How to write this scenario in dynamic PL-SQL programming ? Could the experts help in this regard ? Thank you !!!
Please find the table structures below.
CONCAT_REL table
UNIQUE_MET UNIQUE_EXPRESION
METHOD1 SHIPMENT_MODE = 'AIRWAY' AND TYP = 'BOX' OR TYP = 'ENVELOPE'
METHOD2 SHIPMENT_MODE = 'RAIL_ROAD' AND TYP = 'CONTAINER' AND DELIVERY_PH <> 'CALL'AND DELIVERY_TYP = 'HOUSE'
METHOD3 TYP = 'FRAGILE' AND DELIVERY_PH = 'TEXT' OR DELIVERY_TYP = 'OFFICE'
METHOD4 ACKNOWLDGE = YES
CON_CHK table
PRICING UNIQUE_MET
PRICE_SYSTEM1 METHOD1
PRICE_SYSTEM1 METHOD2
PRICE_SYSTEM2 METHOD3
PRICE_SYSTEM3 METHOD4
USER_PRICNG
USERS PRICING
Rahul PRICE_SYSTEM1
Rahul PRICE_SYSTEM3
Rajkumar PRICE_SYSTEM1
Ashok PRICE_SYSTEM2