Hi Olambe,
I would realize such by putting a insert trigger on the order(details) table and use the inserted table available within the trigger to update the UNIT_IN_STOCK from the products table.
You can even extend the business rule you created this way by marking the trigger for update and and have it in/decrement the UNIT_IN_STOCK acoording to the difference between inserted/delete "table" once you update any order(detail).
See Books online for more info on triggers.
Regards,
Jago
|